woocommerce_enhanced_push_notifications_disabled хук-фильтрWC 10.9.2

Filters whether enhanced push notifications should be disabled.

The feature was previously controlled by a now-deprecated feature flag. It is now enabled by default for all compatible users, but this filter lets a store force it off (e.g. to fall back to Jetpack Sync if something isn't working). The feature also requires a Jetpack connection, which is checked separately below.

Использование

add_filter( 'woocommerce_enhanced_push_notifications_disabled', 'wp_kama_woocommerce_enhanced_push_notifications_disabled_filter' );

/**
 * Function for `woocommerce_enhanced_push_notifications_disabled` filter-hook.
 * 
 * @param bool $disabled Whether enhanced push notifications are disabled.
 *
 * @return bool
 */
function wp_kama_woocommerce_enhanced_push_notifications_disabled_filter( $disabled ){

	// filter...
	return $disabled;
}
$disabled(true|false)
Whether enhanced push notifications are disabled.
По умолчанию: false

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

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

Где вызывается хук

PushNotifications::should_be_enabled()
woocommerce_enhanced_push_notifications_disabled
woocommerce/src/Internal/PushNotifications/PushNotifications.php 152
apply_filters( 'woocommerce_enhanced_push_notifications_disabled', false )

Где используется хук в WooCommerce

Использование не найдено.