woocommerce_should_load_paypal_standard filter-hookWC 5.5.0

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

Usage

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.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.