sync and show
-
hi
there is no option to bulk ‘sync and show’ products, only the option to ‘sync and hide’. that is very unpractical when it comes to variable products. why dont you implement a third option in the pulldown menu to handle the visibility, too?
i now hacked your plugin to set it to ‘sync and show’ instead of ‘sync and hide’, aka. set the meta for fb_visibility, too. i saw this request here a lot, but no solution. so here is my hack:
in file
facebook-for-woocommerce/includes/Admin.php around line 991before:
if ( 'facebook_include' === $action ) { Products::enable_sync_for_products( $products ); $this->resync_products( $products ); } elseif ( 'facebook_exclude' === $action ) {
after:
if ( 'facebook_include' === $action ) { Products::enable_sync_for_products( $products ); foreach ($products as $product) { if ( $product->is_type( 'variable' ) ) { foreach ( $product->get_children() as $variation_id ) { $variation = wc_get_product( $variation_id ); if ( $variation instanceof \WC_Product ) { Products::set_product_visibility($variation, true); } } } else { Products::set_product_visibility($product, true); } } $this->resync_products( $products ); } elseif ( 'facebook_exclude' === $action ) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘sync and show’ is closed to new replies.