Fixed clear cart after payment for block-based themes(Twenty Twenty-Two).

This commit is contained in:
Dharmesh Patel 2022-02-10 10:14:01 +05:30
parent 3eeb1f239f
commit 1be5e81860
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ function wc_clear_cart_after_payment() {
}
}
}
add_action( 'get_header', 'wc_clear_cart_after_payment' );
add_action( 'template_redirect', 'wc_clear_cart_after_payment', 20 );
/**
* Get the subtotal.