IBBoard
Forum Replies Created
-
Okay, fine. You don’t directly save data in the table. But you put metadata like
wcu_order_rateon the order, which is saved in that table. So indirectly, you do save stuff in that table.The currency conversion is tightly coupled with the subtotals that are stored in that table. Either the currency switcher expects to convert those subtotals and totals into the target currency or the subtotal and total should always be in the store’s default currency and the conversion should happen using the rate data when necessary.
So we’re back to my original question:
How should prices be stored on an order? Is line item price supposed to be stored in the default currency and then the rate is used whenever it’s displayed/sent to another system (like PayPal)? Or are the
_line_subtotaland_line_totalinwoocommerce_order_itemmetasupposed to be in the order currency?This is a basic, technical “how does your plugin interact with WooCommerce?” question. Someone in the dev team should know, because if no-one knows then how can the plugin even work?!
That’s still not the question that I asked. But okay.
Where:
woocommerce_order_itemmetatableWhich parameters:
_line_subtotaland_line_totalPlease either get the devs to answer the question “Should those values be stored in the database in the order currency or the default store currency?”, or we can close this thread. A full support request isn’t helpful at this point.
The store that I run is only open intermittently for very short periods of time (maybe a few weeks at once). It has now closed for about three months. During that time, I’m migrating to another system. I’ve used WordPress for six years and WooCommerce for two and a half years, and I wouldn’t give any of my experiences with the platform or the extensions anything above a three star rating.
I didn’t ask for tech support. It’s a clear technical question about the implementation that should have a clear technical answer. It is the kind of thing that should be in public so that anyone else who needs to know (e.g. plugin authors trying to work alongside the currency switcher) can find the answer.
And the fact that it took you very nearly two weeks just to say “please contact support” doesn’t fill me with confidence!
Between this and how horribly slow WordPress is in general, I was already considering migrating the site away from WordPress/Woocommerce/etc. I guess I’d better get busy with that migration!
Ah, sorry. I thought most of the currency functionality was related to WooCommerce and the switcher just made it more accessible for users. It’s so long since I set up the site that I didn’t remember that there was no “other currency” without the currency switcher.
The Currency Switcher is a much smaller plugin, which gives me a smaller target to review. I’ll look into that and see what I can find. I may need to post in their support forum.
I was just talking through the problem with someone else and the one pattern that we have found is that those customers were all logged in _and_ using a foreign currency. All other customers were either guests or were using GBP.
So there’s three groups of people:
- Guest, used any currency – got charged the right price
- Logged in, used GBP – got charged the right price
- Logged in, used another currency – got charged the wrong price because the
PATCHincluded a breakdown that was in GBP prices but with the customer’s currency code
However, we weren’t able to recreate this behaviour with our own test account (logged in user, ordering in USD)
- This reply was modified 1 year, 7 months ago by IBBoard.
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Different fatal error with 2.9.1I’ve traced this down to a combination of a PHP OpCache issue (the first time I’ve seen it in five years of running this blog) and some unexpected PHP behaviour.
Basically, there is trailing code, which I found and linked to, but PHP silently ignores the fact that there’s a
usestatement for something that doesn’t exist.The error occurred because the PHP OpCache detected that the file had been deleted but hadn’t detected that the
service.phpfile had been updated, so the v2.9.0 constructor call was still invoked but the class had already been purged from the cache and didn’t exist.As a developer of 20 years who was using PHP4, this does not fill me with confidence in the modern PHP ecosystem.
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Different fatal error with 2.9.1There are three other support tickets about fatal errors. And that’s in a micro version update. If that’s a normal level of errors to get reported after a micro version then it sounds like I need to consider another plugin!
I included links to the exact lines in version control where the class is still referenced and the commit where the class file is deleted. I can’t find any declaration of the class anywhere in code. But I can try some other debugging over the weekend as well.
Forum: Fixing WordPress
In reply to: How to set the Sender email (Return-Path) with a plugin?Is there really no other way of doing this? I’ve been getting emails spam-canned by GMail because of this*, and if it gets lost with each upgrade of those files then it is a huge PITA.
* Email from and reply to [email protected] but return path defaulted to [email protected]. Once I overrode $Sender to also be [email protected] then the emails didn’t get spam-canned.