Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('wcfm_sell_items_catalog_args', function ($args) {
- global $wpdb;
- if (isset($args['author__not_in'])) unset($args['author__not_in']);
- $args['author'] = 1; //change it with the product author ID (admin ID)
- $args['post_status'] = array('publish', 'private');
- return $args;
- }, 50);
- add_filter('wcfmmp_is_allow_single_product_multivendor_by_product', function ($is_allow, $product_id) {
- $product_author = wcfm_get_vendor_id_by_post($product_id);
- if ($product_author) {
- $is_allow = false;
- }
- return $is_allow;
- }, 50, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement