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

Commit

Permalink
Update check for different template names
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Nov 9, 2023
1 parent 3a52090 commit 88f044b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Domain/Services/JetpackWooCommerceAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,16 @@ public function get_cart_checkout_info() {
$checkout_template = null;
$cart_template_id = null;
$checkout_template_id = null;
$templates = $this->block_templates_controller->get_block_templates( array( 'cart', 'checkout' ) );
$templates = $this->block_templates_controller->get_block_templates( array( 'cart', 'checkout', 'page-checkout', 'page-cart' ) );
$guest_checkout = ucfirst( get_option( 'woocommerce_enable_guest_checkout', 'No' ) );
$create_account = ucfirst( get_option( 'woocommerce_enable_signup_and_login_from_checkout', 'No' ) );

foreach ( $templates as $template ) {
if ( 'cart' === $template->slug ) {
if ( 'cart' === $template->slug || 'page-cart' === $template->slug ) {
$cart_template_id = ( $template->id );
continue;
}
if ( 'checkout' === $template->slug ) {
if ( 'checkout' === $template->slug || 'page-checkout' === $template->slug ) {
$checkout_template_id = ( $template->id );
}
}
Expand Down

0 comments on commit 88f044b

Please sign in to comment.