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:
Barry Hughes 2022-03-03 15:45:54 -08:00 committed by GitHub
commit 8bc310008c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.