In ProgressShopping cart is empty
- This topic has 35 replies, 3 voices, and was last updated 10 months ago by
Alex.
- AuthorPosts
- November 18, 2022 at 4:14 pm #36285
Alex
KeymasterHello,
I am looking at it.
Will let you know.
Regards,
AlexNovember 18, 2022 at 5:08 pm #36287rene
ParticipantDo you need any login details?
November 18, 2022 at 5:29 pm #36288Alex
KeymasterNo, you already provided them.
Regards,
AlexNovember 20, 2022 at 3:25 pm #36293Alex
KeymasterHello Rene,
We have examined our code carefully and we are not calling get_cart before ‘wp_loaded’ action.
Also we couldn’t reproduce the problem even with the premium version of the Delivery Drivers for Vendors plugin.Another approach you can do is to deactivate one by one all other plugins and check if the problem disappears and look at this plugin.
A final workaround would be to comment out the line 83 from “class-lafka-shipping-areas.php”, but this will lead to not proper calculation of the delivery rates per distance (if you use them)
Regards,
AlexNovember 21, 2022 at 9:24 am #36297rene
ParticipantHello Alex,
If I comment out line 83 in “class-lafka-shipping-areas.php” then I can call up the shopping cart and the products are also visible in the shopping cart, even if I only comment out lines 425 – 432
/*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
}
}
}*/
it works and the products are also in the shopping cart visible. However, when I put it back to its original state, there are no products in the shopping cart. I do not understand that entirely.Regards,
ReneNovember 21, 2022 at 3:10 pm #36300Alex
KeymasterHi Rene,
Commenting out line 83 is enough to bypass this function. Means that the rates cache will not be cleared and will not lead to removing the products from the cart content (This doesn’t mean that the cart is cleared by Lafka)
My point is that by commenting this line and leaving it like this the cart works as expected, but calculation of the route will not work correctly.
Again, if you want to find the real problem, you need to deactivate all the plugins one by one and see which one is causing this ..
Regards,
Alex - AuthorPosts
You must be logged in and have valid license to reply to this topic.