Bookable products issue / Woocommerce Bookings Plugin
-
There seem to be an issue with the bookable products.
The bookable products added to the wishlist are correctly stored in the cookie but they are not displayed in the list.The mentioned products seem not to pass the test for VALID PRODUCTS placed in the class.yith-wcwl.php file. It’s a strange behavior because this test simply checks if the products stored in the whishlist’s cookie are published (right?)..
I have out commented the line which filters the products for validity and it works fine – but this way there is a possibility that a product which is not published any more (its status has been changed) stays in the whishlist..
Is there any other way to fix this then the mentioned solution?
I’m using the free version of the plugin.
includes/class.yith-wcwl.php :: line 575:
$valid_products = wc_get_products( array(
‘status’ => ‘publish’,
‘include’ => $items,
‘limit’ => -1,
‘return’ => ‘ids’
) );if( empty( $valid_products ) ){
//return array();
}foreach( $wishlist as $key => $cookie ){
if( in_array( $cookie[‘prod_id’], $hidden_products ) ){
unset( $wishlist[ $key ] );
continue;
}if( ! in_array( $cookie[‘prod_id’], $valid_products ) ){
//unset( $wishlist[ $key ] );
continue;
}
- The topic ‘Bookable products issue / Woocommerce Bookings Plugin’ is closed to new replies.