woocommerce_enhanced_push_notifications_disabled
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.
Usage
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.
Default: false
Changelog
| Since 10.9.2 | Introduced. |
Where the hook is called
woocommerce_enhanced_push_notifications_disabled
woocommerce/src/Internal/PushNotifications/PushNotifications.php 152
apply_filters( 'woocommerce_enhanced_push_notifications_disabled', false )