add to my store specific categories
-
Hi,
How can I hide products from other vendors and only show the ones created by the admin? or specify a category and products that they can add to their stores. (specific products and categories on add to my store section)
Is this possible?
Thanks!`I used this code and it works but is not perfect, every time i add a new product it shows in the add to my store section but the other categories are not showing.
add_filter( 'wcfm_sell_items_catalog_args', function( $args ) { if( isset( $args['author__not_in'] ) ) unset( $args['author__not_in'] ); $args['author'] = 1; return $args; }, 50, 2 ); add_filter( 'wcfmmp_is_allow_single_product_multivendor_by_product', function( $is_allow, $product_id ) { global $WCFM, $WCFMmp, $product, $post; $product_author = wcfm_get_vendor_id_by_post( $product_id ); if( $product_author ) { $is_allow = false; } return $is_allow; }, 50, 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add to my store specific categories’ is closed to new replies.