woocommerce_paypal_account_restriction_notices_enabled хук-фильтрWC 10.4.0

Filters whether account restriction notices should be enabled.

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

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

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.
По умолчанию: true

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

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

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

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

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

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