woocommerce_paypal_account_restriction_notices_enabled filter-hookWC 10.4.0

Filters whether account restriction notices should be enabled.

This filter allows extensions to opt out of the account restriction notice functionality.

Usage

add_filter( 'woocommerce_paypal_account_restriction_notices_enabled', 'wp_kama_woocommerce_paypal_account_restriction_notices_enabled_filter' );

/**
 * Function for `woocommerce_paypal_account_restriction_notices_enabled` filter-hook.
 * 
 * @param bool $enabled Whether account restriction notices are enabled.
 *
 * @return bool
 */
function wp_kama_woocommerce_paypal_account_restriction_notices_enabled_filter( $enabled ){

	// filter...
	return $enabled;
}
$enabled(true|false)
Whether account restriction notices are enabled.
Default: true

Changelog

Since 10.4.0 Introduced.

Where the hook is called

WC_Gateway_Paypal::manage_account_restriction_status()
woocommerce_paypal_account_restriction_notices_enabled
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 1054
if ( ! apply_filters( 'woocommerce_paypal_account_restriction_notices_enabled', true ) ) {

Where the hook is used in WooCommerce

Usage not found.