woocommerce_should_clear_cart_after_payment filter-hookWC 9.3.0

Determine whether the cart should be cleared after payment.

Usage

add_filter( 'woocommerce_should_clear_cart_after_payment', 'wp_kama_woocommerce_should_clear_cart_after_payment_filter' );

/**
 * Function for `woocommerce_should_clear_cart_after_payment` filter-hook.
 * 
 * @param bool $should_clear_cart_after_payment Whether the cart should be cleared after payment.
 *
 * @return bool
 */
function wp_kama_woocommerce_should_clear_cart_after_payment_filter( $should_clear_cart_after_payment ){

	// filter...
	return $should_clear_cart_after_payment;
}
$should_clear_cart_after_payment(true|false)
Whether the cart should be cleared after payment.

Changelog

Since 9.3.0 Introduced.

Where the hook is called

wc_clear_cart_after_payment()
woocommerce_should_clear_cart_after_payment
woocommerce/includes/wc-cart-functions.php 214
$should_clear_cart_after_payment = apply_filters( 'woocommerce_should_clear_cart_after_payment', $should_clear_cart_after_payment );

Where the hook is used in WooCommerce

Usage not found.