Merge pull request #31877 from iamdharmesh/fix/29445
Fixed clear cart after payment for block-based themes/themes without a header template.
This commit is contained in:
commit
8bc310008c
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue