This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing an issue where the list of available products is not visible when logged in as a Wholesale customer on their WooCommerce site. This problem occurs when the WooCommerce Multilingual & Multicurrency plugin is activated, specifically when the multicurrency mode is enabled.
Solution:
We recommend checking the following documentation for a known issue that might be related:
Applying the workaround provided in the documentation appears to resolve the issue on the client's site. If this solution does not seem relevant to your situation, please open a new support ticket with us so we can assist you further.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception, Known issue
This topic contains 22 replies, has 3 voices.
Last updated by Bruno Kos 1 year, 3 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
December 13, 2023 at 8:18 pm #15058767 | |
marc-andreA |
Hello, We encounter a problem on our website when we are connected in a Wholesale session: hidden link When we connect to the following page: hidden link We've done a lot of investigating, all the updates are done and we notice that the problem comes from the WooCommerce Multilingual & Multicurrency plugin. When we deactivate the WooCommerce Multilingual & Multicurrency plugin, we see our products correctly. When we reactivate it, the problem is still there. More precisely, the problem seems to lie with Multicurrency. Can you please help us with this? We can give you the access you need to log in as a Wholesale customer, and to access the backend. Thank you! |
December 14, 2023 at 4:16 pm #15066507 | |
marc-andreA |
Hello, Did you receive our support request? This problem is urgent, because the wholesale orders are not working... Thank you! |
December 14, 2023 at 7:54 pm #15068465 | |
Andrey WPML Supporter since 06/2013 Languages: English (English ) Russian (Русский ) Timezone: Europe/Kyiv (GMT+03:00) |
While one of my teammates takes care of your ticket, I will provide you with the first debugging steps. You probably encounter a fatal error while using the multicurrency. I suggest activating debug.log and checking it. You can do this by adding a few lines to the site’s wp-config.php file. With the error log enabled, you will see what the actual problem is. To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to: define('WP_DEBUG', true); In order to enable the error logging to a file on the server, you need to add yet one more similar line: define( 'WP_DEBUG_LOG', true ); In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory. https://wpml.org/documentation/support/debugging-wpml/ Let us know what you see after the debug mode has been enabled. |
December 14, 2023 at 8:03 pm #15068555 | |
marc-andreA |
Hello, Here's what we see when we log on as a Wholesale customer as an error (see screenshot or message below) Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the king-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/gourmetduvillage/dev.gourmetduvillage.com/wp-includes/functions.php on line 6031 Thank you |
December 15, 2023 at 7:09 pm #15075855 | |
marc-andreA |
Hello, We have some clarification on our problem. The new update for your WooCommerce Multilingual & Multicurrency plugin (Version 5.3.2) is not compatible with Wholesale Suite, nor is it compatible with PHP version 8.0. If we switch back to Version 5.2.0 of the WooCommerce Multilingual & Multicurrency plugin and PHP version 7.4, everything will work correctly. Can you please fix that? Thank you! |
December 18, 2023 at 2:03 pm #15084867 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Hi, Thank you for contacting WPML support! On this sandbox website - hidden link - can you install your Wholesale Suite plugin and try to reproduce this issue with only 1-2 translated products? I installed WPML, WooCommerce and configured it already, if anything else is needed by all means. This site uses PHP 8.1.2. If we see this issue here I will escalate the whole case to our developers. Let me know if you have any questions! Regards, |
December 18, 2023 at 2:27 pm #15085111 | |
marc-andreA |
Hi, We have installed Wholesale Suite on your website. However, we think it would be easier for you to use our staging version of the website where the problem occurs. It's easier to already have all the products and the same context. Thank you! |
December 18, 2023 at 2:47 pm #15085291 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
There is a difference between debugging a website where we assume that there is a compatibility issue and the website which has quite a lot of different plugins, as it may indicate there is a problem in particular with that installation and is typically more difficult to debug. That's what we try to reproduce these issues in sandbox, in the event that we assume that the issue is with compatibility. How can I get wholesale-customer page working, can you set this on the sandbox? Also, in order to have "We don't see the list of available products,", do we only need 1-2 products and their translations on the above wholesale-customer page? |
December 18, 2023 at 3:17 pm #15085509 | |
marc-andreA |
Hi, Hello, I understand. We have integrated two products in English and French. The form is managed from Wholesale > Order forms. Please get back to me if we need to add anything else. Thank you! |
December 18, 2023 at 3:36 pm #15085741 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
Ok, so on hidden link I can see products showing even with multicurrency enabled and I added another currency. Is the issue not reproducible in our website then? |
December 19, 2023 at 6:09 pm #15095753 | |
marc-andreA |
Thank you for setting up the sandbox. Hi, this is Yan speaking in the name of Marc-André. As I witnessed the crash of Wholesale plugin suite, I went to check in the debug.log and I saw the Fatal Error Call Stack that at line #3, you can see the currency switcher plugin (class-wcml-currencies-payment-gateways.php) is implied in the retrieval of the Payment gateways. You can see that the class/member WooCommerce::$payment_gateways seems to become null. I thaught it could've been a PHP version problem, but no. I've tried in both PHP 7.4 and 8.0 (and I left error messages for both as well) Could there be a setting in the WPML Currency switcher that we do wrong? (The king-script.js is disabled BTW) And also, to further my troubleshooting curiosity (and because it implies payment gateways) could you install some payment gateways to your sandbox website ? (Authorize.net would be appreciated, otherwise you could do the usual Paypal, please) Thank you. 7.4 PHP error ############################################## 8.0 PHP error |
December 19, 2023 at 6:51 pm #15096051 | |
marc-andreA |
Oh I also made a scenario on which I have only these plugins activated: Authorize.net Payment Gateway For WooCommerce and with the theme Twenty Twenty Three. Even though I *could* log on as a wholesaler, but as soon as I visited this page: hidden link It made that same error message: Notice: Undefined property: WooCommerce::$payment_gateways in /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/woocommerce-wholesale-prices-premium/includes/wholesale-roles/class-wwpp-wholesale-role-payment-gateway.php on line 286 Fatal error: Uncaught Error: Call to a member function payment_gateways() on null in /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/woocommerce-wholesale-prices-premium/includes/wholesale-roles/class-wwpp-wholesale-role-payment-gateway.php:286 Stack trace: #0 /home/gourmetduvillage/dev.gourmetduvillage.com/wp-includes/class-wp-hook.php(324): WWPP_Wholesale_Role_Payment_Gateway->filter_available_payment_gateways(Array) #1 /home/gourmetduvillage/dev.gourmetduvillage.com/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #2 /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(163): apply_filters('woocommerce_ava...', Array) #3 /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php(216): WC_Payment_Gateways->get_available_payment_gateways() #4 /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/ in /home/gourmetduvillage/dev.gourmetduvillage.com/wp-content/plugins/woocommerce-wholesale-prices-premium/includes/wholesale-roles/class-wwpp-wholesale-role-payment-gateway.php on line 286 |
December 19, 2023 at 6:56 pm #15096063 | |
marc-andreA |
Could you give us an admin access to your sandbox just in case? Thank you! |
December 19, 2023 at 7:35 pm #15096333 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
The log does not tell us which gateway is in question so not sure it would make sense if we continue installing all the gateways trying to figure this out, especially as multicurrency settings cannot be set wrongly to bring the website down. That being said, can you provide this? Please exclude all the media files, etc, to keep the package minimal. And let me know where do I need to go see the error, if there are additional steps apart from only visiting hidden link. I will then escalate the whole package to our 2nd tier for further debugging. |
December 20, 2023 at 6:27 am #15097845 | |
Bruno Kos WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+02:00) |
We have a license for Duplicator Pro, let me know if I can install it and try creating package of my own. Also, can you for the time being deactivate all the other plugins apart from those we to reproduce the issue ( so WooCommerce, Wholesale, etc)? Because if more plugins are active, they may interfere with Duplicator performance causing timeouts. |