WC_Helper_Updater::display_notice_for_expired_and_expiring_subscriptions
Runs on in_plugin_update_message-{file-name}, show a message if plugins subscription expired or expiring soon.
Метод класса: WC_Helper_Updater{}
Хуков нет.
Возвращает
void..
Использование
$result = WC_Helper_Updater::display_notice_for_expired_and_expiring_subscriptions( $plugin_data, $response );
- $plugin_data(объект) (обязательный)
- An array of plugin metadata.
- $response(объект) (обязательный)
- An object of metadata about the available plugin update.
Код WC_Helper_Updater::display_notice_for_expired_and_expiring_subscriptions() WC Helper Updater::display notice for expired and expiring subscriptions WC 11.2.1
public static function display_notice_for_expired_and_expiring_subscriptions( $plugin_data, $response ) {
$product_id = self::get_product_id_from_update_response( $response );
if ( 0 === $product_id || null !== WC_Helper::get_api_error() ) {
return;
}
self::print_update_row_message( self::get_renewal_notice( self::get_subscriptions_for_product( $product_id ), self::CAMPAIGN_UPDATE_ROW ) );
}