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.
Method of the class: WC_Helper_Updater{}
No Hooks.
Returns
void..
Usage
$result = WC_Helper_Updater::display_notice_for_expired_and_expiring_subscriptions( $plugin_data, $response );
- $plugin_data(object) (required)
- An array of plugin metadata.
- $response(object) (required)
- 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 code WC 11.2.2
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 ) );
}