Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Check placeholder page vs current page
Browse files Browse the repository at this point in the history
  • Loading branch information
opr authored and mikejolley committed Aug 4, 2023
1 parent dbf9d09 commit 13ae69c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Templates/CartTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 13ae69c

Please sign in to comment.