Shop showing deleted items
-
Hi Guys,
I have an issue with the plugin. It seems to be synchronising deleted items from WooCommerce to the Facebook Shop.
So, initially I thought we had a problem where the plugin was synchronising draft products to facebook because that seemed to be happening. I moved all draft products into the bin on woocommerce and deleted all items from facebook. Then I did another sync and noticed there were still items that are now in the bin, on facebook.
I’m not sure what else to try to solve the issue. I am using some code to stop out of stock items from synchronising too:
<?php add_filter( 'wt_facebook_sync_products', 'modify_wt_facebook_sync_products', 10, 1 ); function modify_wt_facebook_sync_products( $products ) { $exclude_products = wt_get_out_of_stock_products($products); $sync_products = array_diff( $products, $exclude_products ); return $sync_products; } function wt_get_out_of_stock_products($products) { $args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'post_status' => 'publish', 'post__in' => $products, 'meta_query' => array( array( 'key' => '_stock_status', 'value' => 'outofstock', ) ), 'fields' => 'ids', ); return get_posts( $args ); }
Hopefully that won’t be affecting anything.
I have tried manually deleting items from facebook but it seems they are re-appearing. I can give more details in an email if you like?
Thanks,
- The topic ‘Shop showing deleted items’ is closed to new replies.