Skip to content

Commit

Permalink
Prevent add_shipping_info event in cart
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Oct 10, 2023
1 parent 67933e7 commit 910c2d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/frontend/woocommerce-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-hooks'), 'version' => '7dba86d3381d9018f06c');
<?php return array('dependencies' => array('wp-hooks'), 'version' => '8e97ab5407a1a7355719');
2 changes: 1 addition & 1 deletion assets/frontend/woocommerce-blocks.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Bugfixes:
* Items was not loaded correct in the Ease Digital Downloads begin_checkout event.
* Using variation product selection without including gtmkit_product_data would result in a JavaScript error.
* Fixes a problem where variation products would use the master product id.
* Fixes an error when shipping was selected in the WooCommerce block cart.

Other:

Expand Down
2 changes: 1 addition & 1 deletion src/js/frontend/woocommerce-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addAction(
({ shippingRateId }) => {
window.gtmkit_data.wc.chosen_shipping_method = shippingRateId;

if (window.gtmkit_settings.wc.add_shipping_info.config === 0) return;
if (window.gtmkit_settings.wc.add_shipping_info.config === 0 || window.gtmkit_data.wc.is_checkout === false) return;

if (window.gtmkit_settings.wc.add_shipping_info.config === 2) {
shippingInfo();
Expand Down

0 comments on commit 910c2d6

Please sign in to comment.