Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Groups & Staffs › Category limit not working
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by WCFM Forum.
Viewing 3 reply threads
- AuthorPosts
- May 14, 2018 at 1:18 pm #23251daleParticipant
Under Groups I have a Basic group which has the category limit set to 3. Under Categories I have selected 3 categories. However, the seller who is part of this group seems to be able to post products in additional categories. See attached screenshot.
Attachments:
You must be logged in to view attached files. - May 14, 2018 at 4:37 pm #23272WCFM ForumMember
Hi,
Are you using only WCfM – Groups & Staffs or also have WCfM Ultimate?
If you don’t have WCfM Ultimate then add this function to your site –
function wcfmcap_allowed_taxonomies_custom( $allow, $taxonomy, $term_id ) { $wcfm_capability_options = apply_filters( 'wcfm_capability_options_rules', get_option( 'wcfm_capability_options', array() ) ); if( $taxonomy == 'product_cat' ) $taxonomy = 'categories'; $allowed_taxonomies = ( !empty( $wcfm_capability_options['allowed_' . $taxonomy] ) ) ? $wcfm_capability_options['allowed_' . $taxonomy] : array(); if( is_array( $allowed_taxonomies ) && !empty( $allowed_taxonomies ) ) { if( !in_array( $term_id, $allowed_taxonomies ) ) { $allow = false; } } return $allow; } add_filter( 'wcfm_allowed_taxonomies', 'wcfmcap_allowed_taxonomies_custom', 450, 3 );
Category filtering is a core feature for WCfM Ultimate. But with this function it will work without WCfM Ultimate as well.
Thank You
- May 14, 2018 at 5:29 pm #23278daleParticipant
Thank you
- June 17, 2018 at 9:54 am #24970WCFM ForumMember
Resolved.
- AuthorPosts
Viewing 3 reply threads
- The topic ‘Category limit not working’ is closed to new replies.