In ProgressShopping cart is empty
- This topic has 35 replies, 3 voices, and was last updated 2 months, 2 weeks ago by
Alex.
- AuthorPosts
- November 8, 2022 at 2:47 pm #36177
rene
ParticipantYes, I use the “Products per branch” function, but that can’t be the problem, it also works on other websites that have WCFM without any problems, and they also have different products per branch.
Has anyone on the forum had the same problem until now?
If so how was it resolvedNovember 8, 2022 at 3:08 pm #36178Althemist
KeymasterThis reply has been marked as private.November 8, 2022 at 4:18 pm #36180rene
ParticipantThis reply has been marked as private.November 8, 2022 at 4:26 pm #36181Althemist
KeymasterI can see you are using PHP v. 8.1.12. Let’s start from there – even WordPress and WooCommerce are still not fully compatible with PHP 8+, not to mention other plugins. Change your PHP version to 7.4, try again and let us know.
November 8, 2022 at 5:28 pm #36184rene
ParticipantThis reply has been marked as private.November 8, 2022 at 5:29 pm #36185rene
ParticipantWe changed it new to PHP 7.4
November 9, 2022 at 11:52 am #36199Althemist
KeymasterYour server clearly have a caching problem. I can’t even go past the location confirmation popup. It keeps loading.
As I suspected earlier, caching is probably the reason for the cart problem too. Try to disable ALL types of cache, both on your site AND on server level.
November 10, 2022 at 10:40 am #36218rene
ParticipantGood day
I was in contact with Local Delivery Drivers for WooCommerce plugin support. You wrote that
We had an issue with the lafka theme and their plugin before the error then was:get_cart was called incorrectly, Get cart should not be called before the wp_loaded action
How can you change that
November 10, 2022 at 4:38 pm #36223rene
ParticipantI contacted the support of Local Delivery Drivers for WooCommerce” plugin they looked at it and wrote me the following
We had an issue with the lafka theme and their plugin before the error then was:
get_cart was called incorrectly, Get cart should not be called before the wp_loaded action
Now I don’t know how to change that
November 14, 2022 at 8:40 am #36233Althemist
KeymasterYes, this was changed long time ago. (v. 4.3.0 – 13.07.2022)
November 14, 2022 at 10:04 am #36245rene
ParticipantBut why isn’t it working for me?
I have the Lafka version: 4.3.4November 15, 2022 at 7:45 am #36250rene
ParticipantLocal Delivery Drivers for WooCommerce” plugin support looked at your plugin why cart is always empty.
Here what you wrote what the problem is.
get_cart was called incorrectly. Get cart should not be called before the wp_loaded action. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce->init, do_action(‘woocommerce_init’), WP_Hook->do_action, WP_Hook->apply_filters, LDDFW_Admin->lddfw_shipping_settings__premium_only, WooCommerce->__get, WooCommerce->shipping, WC_Shipping::instance, WC_Shipping->__construct, WC_Shipping->init, do_action(‘woocommerce_shipping_init’), WP_Hook->do_action, WP_Hook->apply_filters, Lafka_Shipping_Areas::clear_wc_shipping_rates_cache, WC_Cart->get_shipping_packages, WC_Cart->get_items_needing_shipping, WC_Cart->get_cart, wc_doing_it_wrong. This message was added in version 2.3.This is the function:
public static function clear_wc_shipping_rates_cache() {
if ( isset( WC()->cart ) ) {
$packages = WC()->cart->get_shipping_packages();
foreach ( $packages as $package_key => $package ) {
WC()->session->set( ‘shipping_for_package_’ . $package_key, false ); // Or true
}
}
}November 15, 2022 at 9:07 am #36254rene
ParticipantHow to fix the problem now?
This is in class-lafka-shipping-areas.php fileNovember 17, 2022 at 10:37 am #36266Althemist
KeymasterHello Rene,
Our lead developer Alex will check this and give you feedback later today.
November 18, 2022 at 1:37 pm #36284rene
ParticipantHello,
Haven’t heard from Alex yet - AuthorPosts
You must be logged in and have valid license to reply to this topic.