From 13ae69c2454b4eb88eb6f4346f68f74b8dd567b8 Mon Sep 17 00:00:00 2001 From: Thomas Roberts Date: Thu, 3 Aug 2023 14:17:22 +0100 Subject: [PATCH] Check placeholder page vs current page --- src/Templates/CartTemplate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Templates/CartTemplate.php b/src/Templates/CartTemplate.php index af804d10113..ed126951543 100644 --- a/src/Templates/CartTemplate.php +++ b/src/Templates/CartTemplate.php @@ -33,7 +33,8 @@ public static function get_placeholder_page() { */ protected function is_active_template() { global $post; - return $post instanceof \WP_Post && get_option( 'woocommerce_cart_page_endpoint' ) === $post->post_name; + $placeholder = $this->get_placeholder_page(); + return null !== $placeholder && $post instanceof \WP_Post && $placeholder->post_name === $post->post_name; } /**