woocommerce_should_load_paypal_standard хук-фильтрWC 5.5.0

Allow third-parties to filter whether PayPal Standard should be loaded or not.

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

add_filter( 'woocommerce_should_load_paypal_standard', 'wp_kama_woocommerce_should_load_paypal_standard_filter', 10, 2 );

/**
 * Function for `woocommerce_should_load_paypal_standard` filter-hook.
 * 
 * @param bool              $should_load Whether PayPal Standard should be loaded.
 * @param WC_Gateway_Paypal $that        The WC_Gateway_Paypal instance.
 *
 * @return bool
 */
function wp_kama_woocommerce_should_load_paypal_standard_filter( $should_load, $that ){

	// filter...
	return $should_load;
}
$should_load(true|false)
Whether PayPal Standard should be loaded.
$that(WC_Gateway_Paypal)
The WC_Gateway_Paypal instance.

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

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

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

WC_Gateway_Paypal::should_load()
woocommerce_should_load_paypal_standard
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 551
return apply_filters( 'woocommerce_should_load_paypal_standard', $should_load, $this );

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

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