Automattic\WooCommerce\Admin
PluginsHelper::maybe_show_expired_subscriptions_notice
Show notice about to expired subscription on WC settings page.
Method of the class: PluginsHelper{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = PluginsHelper::maybe_show_expired_subscriptions_notice();
PluginsHelper::maybe_show_expired_subscriptions_notice() PluginsHelper::maybe show expired subscriptions notice code WC 10.4.3
public static function maybe_show_expired_subscriptions_notice() {
if ( ! WC_Helper::is_site_connected() ) {
return;
}
if ( 'woocommerce_page_wc-settings' !== get_current_screen()->id ) {
return;
}
$notice = self::get_expired_subscription_notice();
if ( isset( $notice['description'] ) ) {
echo '<div id="woo-subscription-expired-notice" class="woo-subscription-expired-notice woo-subscription-notices notice notice-error is-dismissible" data-dismissnonce="' . esc_attr( wp_create_nonce( 'dismiss_notice' ) ) . '">
<p class="widefat">' . wp_kses_post( $notice['description'] ) . '</p>
</div>';
}
}