LLMS_Admin_Notices_Core::gateways()

Check for gateways and output gateway notice


Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.notices.core.php

			);

			LLMS_Admin_Notices::add_notice(
				$id,
				$html,
				array(
					'type'             => 'warning',
					'dismiss_for_days' => 730, // @TODO: there should be a "forever" setting here.
					'remindable'       => false,
				)
			);
		} elseif ( LLMS_Admin_Notices::has_notice( $id ) ) {
			LLMS_Admin_Notices::delete_notice( $id );
		}
	}

	/**
	 * Check for gateways and output gateway notice
	 *
	 * @since 3.0.0
	 * @since 3.13.0 Unknown.
	 * @since 4.5.0 Dismiss notice for 2 years instead of 7 days.
	 *
	 * @return void
	 */
	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(

Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Dismiss notice for 2 years instead of 7 days.
3.13.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.