Automattic\WooCommerce\Admin
PluginsHelper::maybe_show_expired_subscriptions_notice
Show notice about to expired subscription on WC settings page.
Метод класса: PluginsHelper{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = PluginsHelper::maybe_show_expired_subscriptions_notice();
Код PluginsHelper::maybe_show_expired_subscriptions_notice() PluginsHelper::maybe show expired subscriptions notice WC 10.8.1
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>';
}
}