LLMS_Admin_Notices_Core::gateways()
Check for gateways and output gateway notice
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.notices.core.php
public static function gateways() {
$id = 'no-gateways';
if ( ! apply_filters( 'llms_admin_notice_no_payment_gateways', llms()->payment_gateways()->has_gateways( true ) ) ) {
$html = __( 'No LifterLMS Payment Gateways are currently enabled. Students will only be able to enroll in courses or memberships with free access plans.', 'lifterlms' ) . '<br><br>';
$html .= sprintf(
__( 'For starters you can configure manual payments on the %1$sCheckout Settings tab%2$s. Be sure to check out all the available %3$sLifterLMS Payment Gateways%4$s and install one later so that you can start selling your courses and memberships.', 'lifterlms' ),
'<a href="' . add_query_arg(
array(
'page' => 'llms-settings',
'tab' => 'checkout',
),
admin_url( 'admin.php' )
) . '">',
'</a>',
'<a href="https://lifterlms.com/product-category/plugins/payment-gateways/" target="_blank">',
'</a>'
);
LLMS_Admin_Notices::add_notice(
$id,
$html,
array(
'type' => 'warning',
'dismiss_for_days' => 730, // @TODO: there should be a "forever" setting here.
'remindable' => true,
)
);
} elseif ( LLMS_Admin_Notices::has_notice( $id ) ) {
LLMS_Admin_Notices::delete_notice( $id );
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.5.0 | Dismiss notice for 2 years instead of 7 days. |
| 3.13.0 | Unknown. |
| 3.0.0 | Introduced. |