Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function limit_purchases_by_role( $is_purchasable, $product ) {
- if ( wcfm_is_vendor() ) {
- return false;
- }
- return $is_purchasable;
- }
- add_filter( 'woocommerce_is_purchasable', 'limit_purchases_by_role', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement