Strange behaviour with shipping cost calculation
-
I have the following strange phenomenon in a Woocommerce shop (with Avada theme), all the latest updates: For Austria and Germany, a limit of €70 is set, above that shipping is free. This works wonderfully, EXCEPT: as soon as the order total is between €8 and €9.99 (regardless of whether it is only 1 product or several, even different ones), free shipping is activated in the cart! Below and above this, it works perfectly, but not with this order total. What could be causing such a strange error?
Thanks for helpful ideas!
ChristianThe page I need help with: [log in to see the link]
-
Hi @schnuffi that is certainly strange behavior! I’m wondering if there are any other plugins or WooCommerce extensions involved that may be influencing this. Could you add your System Status Report here? Go to WooCommerce > Status and click “Get system report” and then click “Copy for GitHub” and paste the results here.
I’m also curious what your shipping settings look like. Does this only happen for a particular shipping zone or class?
Hi Corey and many thanks for your response!
Here is my status report from the live site:
System Status Report
### WordPress Environment ###
WordPress address (URL): [Redacted]
Site address (URL): [Redacted]
WC Version: 9.0.2
Legacy REST API Package Version: ✔ 1.0.4
Action Scheduler Version: ✔ 3.7.4
Log Directory Writable: ✔
WP Version: 6.5.5
WP Multisite: –
WP Memory Limit: 640 MB
WP Debug Mode: –
WP Cron: ✔
Language: de_DE_formal
External object cache: –
### Server Environment ###
Server Info: Apache
PHP Version: 8.2.20
PHP Post Max Size: 512 MB
PHP Time Limit: 180
PHP Max Input Vars: 5000
cURL Version: 7.61.1
OpenSSL/1.1.1k
SUHOSIN Installed: –
MySQL Version: 8.0.36
Max Upload Size: 500 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
[REDACTED]
### Post Type Counts ###
attachment: 362
avada_faq: 17
avada_portfolio: 24
document_template: 7
fusion_element: 22
fusion_form: 1
fusion_icons: 1
fusion_tb_layout: 10
fusion_tb_section: 19
fusion_template: 3
itsec-dash-card: 5
itsec-dashboard: 1
nav_menu_item: 59
page: 55
popup: 3
popup_theme: 8
post: 20
product: 80
revision: 122
shop_coupon: 1
shop_order: 5265
shortcoder: 9
slide: 30
viwec_template: 14
wp_global_styles: 1
wp_navigation: 1
wphtmlmail_mail: 28
### Security ###
Secure connection (HTTPS): ✔
Hide errors from visitors: ✔
### Active Plugins (46) ###
404 to 301 - Redirect, Log and Notify 404 Errors: von Joel James – 3.1.4
Add URL Slugs as Body Classes: von Aaron T. Grogg – 1.3
Advanced Access Manager: von AAM – 6.9.33
Akismet Anti-spam: Spam Protection: von Automattic - Anti-Spam-Team – 5.3.2
Solid Security Basic: von SolidWP – 9.3.3
Classic Editor +: von <a href="https://so-wp.com">Pieter Bos</a>
<a href="https://gschoppe.com">Greg Schoppe</a> – 4.3.0
Disable Comments: von WPDeveloper – 2.4.6
Disable Everything: von Dessky Team – 0.4.1
Duplicator: von Duplicator – 1.5.9
Duplicator: von Duplicator – 1.5.9
Enhanced Media Library: von wpUXsolutions – 2.9.3
Avada Builder: von ThemeFusion – 3.11.9
Avada Core: von Theme Einstellungen – 5.11.9
Avada Custom Branding: von ThemeFusion – 1.2
Loco Translate: von Tim Whitlock – 2.6.10
Log cleaner for Solid Security: von Rocket Apps – 1.4.1
MimeTypes Link Icons: von Toby Cox
Juliette Reinders Folmer – 3.2.19
One Stop Shop für WooCommerce: von vendidero – 1.6.2
Permalink Manager Lite: von Maciej Bis – 2.4.3.4
Popup Maker: von Popup Maker – 1.19.0
PublishPress Future: von PublishPress – 3.4.0.1
Shortcoder: von Aakash Chakravarthy – 6.3.2
Simple Custom Post Order: von Colorlib – 2.5.7
String Locator: von InstaWP – 2.6.5
Trusted Shops Easy Integration for WooCommerce: von vendidero – 2.0.2
Update URLs: von KaizenCoders – 1.2.7.1
UpdraftPlus - Backup/Restore: von UpdraftPlus.Com
DavidAnderson – 1.24.3
Checkout Field Editor for WooCommerce: von ThemeHigh – 2.0.2
Unzer Payments: von Unzer – 1.5.1
Country Based Payments for WooCommerce: von Ivan Paulin – 1.5
Customizer for WooCommerce: von SkyVerge – 2.8.0
Germanized für WooCommerce Pro: von vendidero – 3.10.3
Germanized für WooCommerce: von vendidero – 3.16.9
WooCommerce Legacy REST API: von WooCommerce – 1.0.4
WooCommerce PayPal Payments: von WooCommerce – 2.8.0
WooCommerce Perfect Payment Reminder Pro: von WP-Codings – 1.5.2
WooCommerce Matomo Analytics: von InnoCraft – 1.0.23
WooCommerce: von Automattic – 9.0.2
Yoast SEO: von Team Yoast – 22.9
WP Fastest Cache: von Emre Vona – 1.2.8
WP HTML Mail - Email Template Designer: von Hannes Etzelstorfer // codemiq – 3.4.7
Connect Matomo: von André Bräkling – 1.0.30
Widgets for Google Reviews: von Trustindex.io – 11.9
WP Rollback: von WP Rollback – 2.0.7
WP STAGING PRO - Backup Duplicator & Migration: von WP-STAGING – 4.2.14
WP HTML Mail - WooCommerce: von Hannes Etzelstorfer // codemiq – 2.9.27
### Inactive Plugins (5) ###
Custom Order Status Manager for WooCommerce: von Bright Plugins – 1.1.3.2
Disable Gutenberg: von Jeff Starr – 3.1.2
Google Listings and Ads: von WooCommerce – 2.7.5
Premmerce WooCommerce Customers Manager: von Premmerce – 1.1.14
Slider Revolution: von ThemePunch – 6.7.9
### Must Use Plugins (2) ###
Solid Security Loader: von SolidWP – 1.0
WP STAGING Optimizer: von René Hermenau – 1.5.1
### Settings ###
API Enabled: ✔
Force SSL: –
Currency: EUR (€)
Currency Position: left_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: ✔
### Logging ###
Enabled: ✔
Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
Retention period: 30 Tage
Level threshold: –
Log directory size: 402 kB
### WC Pages ###
Shop-Basis: ❌ Die Sichtbarkeit der Seite sollte öffentlich sein
Warenkorb: ❌ Die Seite enthält nicht den [woocommerce_cart]-Shortcode oder woocommerce/cart-Block.
Kasse: ❌ Die Seite enthält nicht den [woocommerce_checkout]-Shortcode oder woocommerce/checkout-Block.
Ihr Konto: #16576 - /konto/
Allgemeine Geschäftsbedingungen: #20842 - /agb/
### Theme ###
Name: Avada Child
Version: 1.0.0
Author URL: https://theme-fusion.com
Child Theme: ✔
Parent Theme Name: Avada
Parent Theme Version: 7.11.9
Parent Theme Author URL: https://themeforest.net/user/ThemeFusion
WooCommerce Support: ✔
### Templates ###
Overrides: Avada/woocommerce/cart/cart.php
Avada/woocommerce/checkout/form-pay.php
Avada/woocommerce/checkout/review-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/admin-cancelled-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/admin-failed-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/admin-new-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-completed-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-invoice.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-new-account.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-note.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-on-hold-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-processing-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-refunded-order.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/customer-reset-password.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/email-customer-details.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/email-order-details.php
/home/.sites/47/site2370592/web/wp-content/plugins/wp-html-mail-woocommerce/views/woocommerce/template/email-order-items.php
Avada/woocommerce/single-product/short-description.php
Avada/woocommerce/single-product/tabs/additional-information.php
Avada/woocommerce/single-product/tabs/description.php
### WooCommerce PayPal Payments ###
Onboarded: ✔
Shop country code: AT
WooCommerce currency supported: ✔
Advanced Card Processing available in country: ✔
Pay Later messaging available in country: –
Webhook status: ✔
PayPal Vault enabled: –
ACDC Vault enabled: –
Logging enabled: ✔
Reference Transactions: –
Used PayPal Checkout plugin: –
Subscriptions Mode: Disabled
### Admin ###
Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customize-store
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
product-custom-fields
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
Disabled Features: minified-js
new-product-management-experience
pattern-toolkit-full-composability
product-pre-publish-modal
settings
async-product-editor-category-field
launch-your-store
product-editor-template-system
Daily Cron: ✔ Next scheduled: 2024-06-28 10:46:15 +02:00
Options: ✔
Notes: 48
Onboarding: completed
### Action Scheduler ###
Abgebrochen: 1
Oldest: 2024-06-08 09:16:54 +0200
Newest: 2024-06-08 09:16:54 +0200
Abgeschlossen: 782
Oldest: 2024-05-27 21:15:05 +0200
Newest: 2024-06-27 09:36:21 +0200
Fehlgeschlagen: 245
Oldest: 2023-09-26 13:46:54 +0200
Newest: 2024-06-26 16:45:23 +0200
Ausstehend: 9
Oldest: 2024-06-28 05:06:30 +0200
Newest: 2024-07-01 00:00:00 +0200
### Status report information ###
Generated at: 2024-06-27 20:02:36 +02:00I can also tell you that I rised a staging site to investigate that phenomenon nearer. I disabled some of the plugins there, which aren’t neccessary , but that didn’t change anything. But I didn’t deactivate all plugins.
To this entries:
Shop-Basis: ❌ Die Sichtbarkeit der Seite sollte öffentlich sein
Warenkorb: ❌ Die Seite enthält nicht den [woocommerce_cart]-Shortcode oder woocommerce/cart-Block.
Kasse: ❌ Die Seite enthält nicht den [woocommerce_checkout]-Shortcode oder woocommerce/checkout-Block.We do not use the shop base page. But that has nothing to do with it anyway.
In the cart we don’t use the [woocommerce_cart]-Shortcode (but the Avada based Fusion elements instead), but I tried that on the staging site and the phenomenon showed up in the shortcode based cart also. This also applies to the checkout, but the problem anyway arises one step earlier on the cart page.
Finally to your question “I’m also curious what your shipping settings look like. Does this only happen for a particular shipping zone or class?”
We have 6 shipping zones: 1 – Austria, 2 – Germany and 3 to 6 other european countries, but there is no free shipping option, it’s only in Austria and Germany. In these 2 countries we have an individual shipping method with a flat-rate (AT: 5,90; DE: 9,50) and a second method “free shipping”, where the condition is a cart total of minimum € 70.- So far, so simple.
The shop is running now for around 1 month and the phenomenon exists from the beginning, but we noticed it just 2 days ago, as there was an order with an order total of 9,90 and free shipping. So we investigated that and found 3 or for more orders within the last weeks also lacking of shipping costs and order totals of 9,90.
THX again for your help!
Christian
In addition: I contacted Vendidero (Germanized) support also, but they said, it has nothing to do with their plugins. So I turned over to Woo…
Interesting. Ok, a couple more questions:
- Do these unqualified orders that all got free shipping have anything else in common? Are they all from the same country (presumably in one of the two where you set up that option)? Were the products in the orders all on sale? Did they apply a coupon? Something else?
- Anything in the orders notes to suggest how this could have happened? Was the total order amount originally higher and then it got modified?
Since you have the staging site and it sounds like you’ve been able to replicate the issue there, my recommendation would be to try disabling all other plugins and see if you can still replicate. If so, then there could be a bug in WooCommerce and we’d love to know the steps to replicate it so we can fix it!
Hi again Corey, and sorry for the dealy – we had to sleep here in Austria 😉
I will have to investigate for things the affected orders could have in common, but for now I can say:
All affected orders came from from Austria. Prices show as for Austrian customers as the default setup, when not logged in / before going on to state address, payment method and so on. I will have to check, what happens, if I declare myself as a german customer.
The phenomenon is showing up every time the order total is between 8.- an 9,99.-, regardless if there is only 1 product ordered or several, even different and if they are on sale or not. And we are not using coupons so far. It’s all very basic.
It has nothing to do with order total originally beeing higher and then being reduced (I tried that before) or being under 8.- and then being rised. It shows up immediately after placing a single product with a price of for example 9,90 into the cart, as well as with several products with a higher total amount then reduced to an amount of 8.- to 9,99.-. This seems to be the ONLY and CENTRAL condition: total order amount is between 8 an 10..
I’ll try to deactivate all other plugins on our staging site and then report to you. If you like, I could give you the URL of it, so you could try it yourself with test orders, selecting “prepayment” as payment method and something like Mr. Test Customer as your name. Is there a possibility to send the url only to you?
THX for now again
Christian
So, first I tried something different now and it worked!! What I did:
Ordering a single 9,90 product, where shipping should not be free
1) Stating a german address: shipping costs are shown correctly after being shown as free with an Austrian address before!
2) Changing order address back to Austria: shipping is free again - that's wrong!
3) Changing to ANY other country (no free option exists): shipping fee is calculated correctly
4) Changing the order oft he shipping zones in the Woo setup (initially Austria, Germany, other countries to Germany, Austria, other countries had no effect
5) Deleting and setting up shipping zone Austria completely new (with the same 2 methods flat rate and free) had no effect
6) Changing address to being a Bulgarian customer (where no free shipping exists); shipping fee is correct
7) Changing the shipping zone Austria (with free shipping) to Bulgaria: didn't change anything
8) Deleting this shipping zone (now Bulgaria) and completely setting it up again (as Bulgaria) with ONLY flat rate (but 6,90 instead of 5,90.-) WITHOUT free shipping: shipping cost is correct
9) Adding free shipping (from 70.- order total) to Bulgaria: shipping is calculated correctly!!!
10)Changing this shipping zone to Austria and altering order address to Austria: shipping is calculated correctly!!!
11) Changing shipping cost to 5,90: shipping is still calculated correctly!!! I have'nt tested with every possible order total, but from 1,90 to around 20.- it worked and even the free shipping from >= 70.- is correctly showing up now.So it finally seems, the problem was setting up 2 shipping methods consecutive within 1 step in the shipping zone? Because that was the only thing I altered in comparison to initially setting up shipping zones / methods!
I repeated steps 8 to 11 in the live environment and you wont believe it: it worked!What do you think?
@schnuffi That’s great! I’m so glad it now seems to be working correctly.
It does seem like there’s potentially a bug in here somewhere, but I’m not quite sure where it is.
So it finally seems, the problem was setting up 2 shipping methods consecutive within 1 step in the shipping zone? Because that was the only thing I altered in comparison to initially setting up shipping zones / methods!
I will try setting up a new store, with only the WooCommerce plugin and see if I can replicate this, but I’m not sure I completely understand what happened here. Are you saying that the order that the shipping methods were created made a difference?
So far I haven’t been able to replicate this with just WooCommerce. Let me know if you figure out a way!
Hey again Corey,
Are you saying that the order that the shipping methods were created made a difference?
No, not exactly the order, but setting up 2 shipping methods together in 1 step before saving.
First I tried setting up a new shipping zone for a country with shipping method “flat rate” AND directly after that shipping method “free” before clicking on SAVE. Doing so, the error occured.
Then I deleted this shipping zone and started over again, but this time clicking on SAVE immediately after setting up the first shipping method “flat rate”. After that I set up the second shipping method “free” and saved again. That made the differenece and finally stopped the problem.
Note: I do not have ONLY Woocommerce installed and activ, but also Germanized pro.
THX Christian
Hi Christian, @schnuffi,
This seems to be related to a known bug with WooCommerce at the moment. Our developers are looking into it, and it should be fixed very soon (you can find more details here: https://github.com/woocommerce/woocommerce/pull/46857).
In the meantime, typically the workaround there is to save the free shipping condition price without a comma or point (without a decimal separator). I’m happy you’ve found a workaround that works for you, even with decimals!
Cheers!
-OP
- The topic ‘Strange behaviour with shipping cost calculation’ is closed to new replies.