diff --git a/src/Templates/CartTemplate.php b/src/Templates/CartTemplate.php index 06e340bef01..03ea68ecab0 100644 --- a/src/Templates/CartTemplate.php +++ b/src/Templates/CartTemplate.php @@ -32,7 +32,8 @@ public static function get_placeholder_page() { * @return boolean */ protected function is_active_template() { - return is_cart(); + global $post; + return get_option( 'woocommerce_cart_page_endpoint' ) === $post->post_name; } /** diff --git a/src/Templates/CheckoutTemplate.php b/src/Templates/CheckoutTemplate.php index 982163e97d0..399580012c9 100644 --- a/src/Templates/CheckoutTemplate.php +++ b/src/Templates/CheckoutTemplate.php @@ -41,6 +41,7 @@ public static function get_template_title() { * @return boolean */ public function is_active_template() { - return is_checkout(); + global $post; + return get_option( 'woocommerce_checkout_page_endpoint' ) === $post->post_name; } }