WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Helper_Updater::block_expired_updates() public WC 4.1.0

Hooked into the upgrader_pre_download filter in order to better handle error messaging around expired plugin updates. Initially we were using an empty string, but the error message that no_package results in does not fit the cause.

{} Это метод класса: WC_Helper_Updater{}

Хуков нет.


false|WP_Error. False to proceed with the update as normal, anything else to be returned instead of updating.


$result = WC_Helper_Updater::block_expired_updates( $reply, $package );
$reply(true|false) (обязательный)
Holds the current filtered response.
$package(строка) (обязательный)
The path to the package file for the update.

Список изменений

С версии 4.1.0 Введена.

Код WC_Helper_Updater::block_expired_updates() WC 5.4.1

public static function block_expired_updates( $reply, $package ) {
	// Don't override a reply that was set already.
	if ( false !== $reply ) {
		return $reply;

	// Only for packages with expired subscriptions.
	if ( 0 !== strpos( $package, 'woocommerce-com-expired-' ) ) {
		return false;

	return new WP_Error(
			// translators: %s: URL of WooCommerce.com subscriptions tab.
			__( 'Please visit the <a href="%s" target="_blank">subscriptions page</a> and renew to continue receiving updates.', 'woocommerce' ),
			esc_url( admin_url( 'admin.php?page=wc-addons&section=helper' ) )