Raunak Gupta
Forum Replies Created
-
Hi @danielinhou,
Thank you for the quick response. I had seen developer.woocommerce.com but couldn’t able to find related article.
I will give it a try on FB and Slack group, and see if I get any help/idea.
Thank you.
Forum: Plugins
In reply to: [YITH WooCommerce Ajax Product Filter] Bug with 3.8.3 versionHi,
I too was having same issue after upgrading to v3.8.3, but after replacing the mentioned file it worked for me. Thanks @yithemes .
Hi @ranaghosh, No I haven’t got the work around but got the exact area which is causing the error.
If you look into the below image you will get the idea.
/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-frontend.php
line number 203 is causing the errorIf I replace this line
$this->unfiltered_product_ids = apply_filters( 'yith_wcan_unfiltered_product_ids', get_posts( $unfiltered_args ), $query, $current_wp_query );
by this
$this->unfiltered_product_ids = [];
Then everything start working, but I don’t what effect will this in UI filtration of product.
- This reply was modified 4 years, 9 months ago by Raunak Gupta.
Forum: Plugins
In reply to: Woocommerce Change Cart Sort OrderUse this code it will sort the cart by newest – oldest.
add_action('woocommerce_cart_loaded_from_session', 'wh_cartOrderItemsbyNewest'); function wh_cartOrderItemsbyNewest() { //if the cart is empty do nothing if (WC()->cart->get_cart_contents_count() == 0) { return; } //array to collect cart items $cart_sort = []; //add cart item inside the array foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) { $cart_sort[$cart_item_key] = WC()->cart->cart_contents[$cart_item_key]; } //replace the cart contents with in the reverse order WC()->cart->cart_contents = array_reverse($cart_sort); }
Reference: Change order of Cart in WooCommerce