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

Render Checkout/Cart containing pages without template overriding #10359

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Templates/CartTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Templates/CheckoutTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}