woocommerce_paypal_use_orders_v2 filter-hookWC 10.2.0

Filters whether the gateway should use Orders v2 API.

Usage

add_filter( 'woocommerce_paypal_use_orders_v2', 'wp_kama_woocommerce_paypal_use_orders_v2_filter' );

/**
 * Function for `woocommerce_paypal_use_orders_v2` filter-hook.
 * 
 * @param bool $use_orders_v2 Whether the gateway should use Orders v2 API.
 *
 * @return bool
 */
function wp_kama_woocommerce_paypal_use_orders_v2_filter( $use_orders_v2 ){

	// filter...
	return $use_orders_v2;
}
$use_orders_v2(true|false)
Whether the gateway should use Orders v2 API.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

WC_Gateway_Paypal::maybe_onboard_with_transact()
woocommerce_paypal_use_orders_v2
WC_Gateway_Paypal::should_use_orders_v2()
woocommerce_paypal_use_orders_v2
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 321-324
$use_orders_v2 = apply_filters(
	'woocommerce_paypal_use_orders_v2',
	PayPalHelper::is_orders_v2_migration_eligible()
);
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 958-961
$use_orders_v2 = apply_filters(
	'woocommerce_paypal_use_orders_v2',
	PayPalHelper::is_orders_v2_migration_eligible()
);

Where the hook is used in WooCommerce

Usage not found.