Sync variable products with catalogue visibility set to ‘Search results only’
-
Hi,
Please can the product sync be updated to include variable products with catalogue visibility set to ‘search results only’
We use a plug in called ‘IconicWP Show Single Variations’ that allows us to publish all variations to the WooCommerce catalogue without showing the parent product. To do this we can set catalogue visibility for each varation and then set the parent variation to ‘Search results only’.
The current filter in place in \includes\ProductSync\ProductValidator.php on line 293 is set to ‘product->is_visible()’
if ( ! $product->is_visible() ) { throw new ProductExcludedException( __( 'This product cannot be synced to Facebook because it is hidden from your store catalog.', 'facebook-for-woocommerce' ) ); }
This prevents products set to ‘Search results only’ from syncing. If we amend it to ‘product->product_visibility == ‘hidden’ like the example below then those products are synced.
if ( $product->product_visibility == 'hidden' ) { throw new ProductExcludedException( __( 'This product cannot be synced to Facebook because it is hidden from your store catalog.', 'facebook-for-woocommerce' ) ); }
Any chance the plugin can be updated to sync these variable products please?
Thanks
- The topic ‘Sync variable products with catalogue visibility set to ‘Search results only’’ is closed to new replies.