Changeset 3361878
- Timestamp:
- 09/15/2025 03:04:20 PM (6 months ago)
- Location:
- tax-switch-for-woocommerce
- Files:
-
- 98 added
- 5 edited
-
tags/1.5.14 (added)
-
tags/1.5.14/LICENSE.txt (added)
-
tags/1.5.14/README.txt (added)
-
tags/1.5.14/admin (added)
-
tags/1.5.14/admin/class-wdevs-tax-switch-admin.php (added)
-
tags/1.5.14/admin/index.php (added)
-
tags/1.5.14/admin/js (added)
-
tags/1.5.14/admin/js/wdevs-tax-switch-woocommerce.js (added)
-
tags/1.5.14/admin/partials (added)
-
tags/1.5.14/admin/partials/section-wdevs-tax-switch-shortcode.php (added)
-
tags/1.5.14/build (added)
-
tags/1.5.14/build/label (added)
-
tags/1.5.14/build/label/block.json (added)
-
tags/1.5.14/build/label/index-rtl.css (added)
-
tags/1.5.14/build/label/index.asset.php (added)
-
tags/1.5.14/build/label/index.css (added)
-
tags/1.5.14/build/label/index.js (added)
-
tags/1.5.14/build/label/style-index-rtl.css (added)
-
tags/1.5.14/build/label/style-index.css (added)
-
tags/1.5.14/build/label/view.asset.php (added)
-
tags/1.5.14/build/label/view.js (added)
-
tags/1.5.14/build/shared (added)
-
tags/1.5.14/build/shared/shared.asset.php (added)
-
tags/1.5.14/build/shared/shared.js (added)
-
tags/1.5.14/build/switch (added)
-
tags/1.5.14/build/switch/advanced-product-fields-for-woocommerce.asset.php (added)
-
tags/1.5.14/build/switch/advanced-product-fields-for-woocommerce.js (added)
-
tags/1.5.14/build/switch/block.json (added)
-
tags/1.5.14/build/switch/fibofilters.asset.php (added)
-
tags/1.5.14/build/switch/fibofilters.js (added)
-
tags/1.5.14/build/switch/index-rtl.css (added)
-
tags/1.5.14/build/switch/index.asset.php (added)
-
tags/1.5.14/build/switch/index.css (added)
-
tags/1.5.14/build/switch/index.js (added)
-
tags/1.5.14/build/switch/kapee-theme.asset.php (added)
-
tags/1.5.14/build/switch/kapee-theme.js (added)
-
tags/1.5.14/build/switch/product-extras-for-woocommerce.asset.php (added)
-
tags/1.5.14/build/switch/product-extras-for-woocommerce.js (added)
-
tags/1.5.14/build/switch/style-index-rtl.css (added)
-
tags/1.5.14/build/switch/style-index.css (added)
-
tags/1.5.14/build/switch/view.asset.php (added)
-
tags/1.5.14/build/switch/view.js (added)
-
tags/1.5.14/build/switch/woocommerce-measurement-price-calculator.asset.php (added)
-
tags/1.5.14/build/switch/woocommerce-measurement-price-calculator.js (added)
-
tags/1.5.14/build/switch/woocommerce-product-addons.asset.php (added)
-
tags/1.5.14/build/switch/woocommerce-product-addons.js (added)
-
tags/1.5.14/build/switch/woocommerce-quantity-manager.asset.php (added)
-
tags/1.5.14/build/switch/woocommerce-quantity-manager.js (added)
-
tags/1.5.14/build/switch/woocommerce-tiered-price-table.asset.php (added)
-
tags/1.5.14/build/switch/woocommerce-tiered-price-table.js (added)
-
tags/1.5.14/build/switch/woocommerce-tm-extra-product-options.asset.php (added)
-
tags/1.5.14/build/switch/woocommerce-tm-extra-product-options.js (added)
-
tags/1.5.14/build/switch/yith-woocommerce-product-add-ons.asset.php (added)
-
tags/1.5.14/build/switch/yith-woocommerce-product-add-ons.js (added)
-
tags/1.5.14/includes (added)
-
tags/1.5.14/includes/assets (added)
-
tags/1.5.14/includes/assets/css (added)
-
tags/1.5.14/includes/assets/css/wdevs-tax-switch-shared.css (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-activator.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-block-label.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-block-shared.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-block-switch.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-block.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-compatibility.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-deactivator.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-loader.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-mini-cart-context.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch-woocommerce.php (added)
-
tags/1.5.14/includes/class-wdevs-tax-switch.php (added)
-
tags/1.5.14/includes/index.php (added)
-
tags/1.5.14/includes/trait-wdevs-tax-switch-display.php (added)
-
tags/1.5.14/includes/trait-wdevs-tax-switch-helper.php (added)
-
tags/1.5.14/includes/trait-wdevs-tax-switch-plugins.php (added)
-
tags/1.5.14/languages (added)
-
tags/1.5.14/languages/build.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-en_US-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-en_US-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-en_US.l10n.php (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-en_US.mo (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-en_US.po (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-nl_NL-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-nl_NL-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-nl_NL.l10n.php (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-nl_NL.mo (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-nl_NL.po (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-sv_SE-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-sv_SE-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-sv_SE.l10n.php (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-sv_SE.mo (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce-sv_SE.po (added)
-
tags/1.5.14/languages/tax-switch-for-woocommerce.pot (added)
-
tags/1.5.14/public (added)
-
tags/1.5.14/public/class-wdevs-tax-switch-public.php (added)
-
tags/1.5.14/public/css (added)
-
tags/1.5.14/public/css/wdevs-tax-switch-public.css (added)
-
tags/1.5.14/public/index.php (added)
-
tags/1.5.14/uninstall.php (added)
-
tags/1.5.14/wdevs-tax-switch.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/build/label/block.json (modified) (1 diff)
-
trunk/build/switch/block.json (modified) (1 diff)
-
trunk/includes/trait-wdevs-tax-switch-helper.php (modified) (5 diffs)
-
trunk/wdevs-tax-switch.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tax-switch-for-woocommerce/trunk/README.txt
r3348796 r3361878 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 1.5.1 36 Stable tag: 1.5.14 7 7 Requires PHP: 7.2 8 8 License: GPL-2.0+ … … 233 233 234 234 == Changelog == 235 = 1.5.14 = 236 * Fixed price calculation if tax is zero for the current customer (zero tax rate country) 237 235 238 = 1.5.13 = 236 239 * Fixed tax calculation if product price is zero -
tax-switch-for-woocommerce/trunk/build/label/block.json
r3348796 r3361878 3 3 "apiVersion": 3, 4 4 "name": "wdevs/tax-switch-label", 5 "version": "1.5.1 3",5 "version": "1.5.14", 6 6 "title": "Tax Switch text label", 7 7 "category": "woocommerce", -
tax-switch-for-woocommerce/trunk/build/switch/block.json
r3348796 r3361878 3 3 "apiVersion": 3, 4 4 "name": "wdevs/tax-switch", 5 "version": "1.5.1 3",5 "version": "1.5.14", 6 6 "title": "Tax Switch for WooCommerce", 7 7 "category": "woocommerce", -
tax-switch-for-woocommerce/trunk/includes/trait-wdevs-tax-switch-helper.php
r3348796 r3361878 87 87 * 88 88 * @param WC_Product $product 89 * 89 90 * @return float|int 90 91 * @since 1.5.13 … … 101 102 $calculator->set_price( 1.00 ); 102 103 103 // Directly calculate tax rate to avoid infinite recursion104 104 $price_excl_tax = wc_get_price_excluding_tax( $calculator ); 105 105 106 // Prevent division by zero (should not happen with €10.00 but safety first)106 // Prevent division by zero (should not happen with 1.00 but safety first) 107 107 if ( $price_excl_tax <= 0 ) { 108 108 return 0; … … 135 135 } else { 136 136 $calculator->set_tax_status( 'taxable' ); 137 } 138 139 //If the original price doesn't have any tax. For example; country with 0 tax. 140 $tax_rate = $this->get_product_tax_rate( $calculator ); 141 if ( $tax_rate <= 0 ) { 142 return $price; 137 143 } 138 144 … … 273 279 274 280 /** 281 * @return array 275 282 * @since 1.5.4 276 283 * 277 * @return array278 284 */ 279 285 public function register_script( $handle, $build_dir, $asset_name, $extra_dependencies = [] ) { 280 $script_path = plugin_dir_url( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.js';281 $script_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name .'.asset.php' );286 $script_path = plugin_dir_url( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.js'; 287 $script_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.asset.php' ); 282 288 283 289 wp_register_script( … … 292 298 293 299 /** 300 * @return array 294 301 * @since 1.5.4 295 302 * 296 * @return array297 303 */ 298 304 public function enqueue_script( $handle, $build_dir, $asset_name, $extra_dependencies = [] ) { 299 $script_path = plugin_dir_url( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.js';300 $script_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name .'.asset.php' );305 $script_path = plugin_dir_url( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.js'; 306 $script_asset = require( plugin_dir_path( dirname( __FILE__ ) ) . 'build/' . $build_dir . '/' . $asset_name . '.asset.php' ); 301 307 302 308 wp_enqueue_script( -
tax-switch-for-woocommerce/trunk/wdevs-tax-switch.php
r3348796 r3361878 17 17 * Plugin URI: https://wijnberg.dev 18 18 * Description: Let customers toggle between inclusive and exclusive VAT pricing in your WooCommerce store. 19 * Version: 1.5.1 319 * Version: 1.5.14 20 20 * Author: Wijnberg Developments 21 21 * Author URI: https://wijnberg.dev/ … … 41 41 * Rename this for your plugin and update it as you release new versions. 42 42 */ 43 define( 'WDEVS_TAX_SWITCH_VERSION', '1.5.1 3' );43 define( 'WDEVS_TAX_SWITCH_VERSION', '1.5.14' ); 44 44 45 45 /**
Note: See TracChangeset
for help on using the changeset viewer.