Render Checkout/Cart containing pages without template overriding (https://github.com/woocommerce/woocommerce-blocks/pull/10359)
* Render Checkout/Cart containing pages without template overriding * Fix checkout typo --------- Co-authored-by: Mike Jolley <mike.jolley@me.com>
This commit is contained in:
parent
025a280b33
commit
73633ee3d1
|
@ -32,7 +32,8 @@ class CartTemplate extends AbstractPageTemplate {
|
|||
* @return boolean
|
||||
*/
|
||||
protected function is_active_template() {
|
||||
return is_cart();
|
||||
global $post;
|
||||
return get_option( 'woocommerce_cart_page_endpoint' ) === $post->post_name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,7 @@ class CheckoutTemplate extends AbstractPageTemplate {
|
|||
* @return boolean
|
||||
*/
|
||||
public function is_active_template() {
|
||||
return is_checkout();
|
||||
global $post;
|
||||
return get_option( 'woocommerce_checkout_page_endpoint' ) === $post->post_name;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue