Advertisement
wclovers

Untitled

Dec 27th, 2021
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. function limit_purchases_by_role( $is_purchasable, $product ) {
  2.     if ( wcfm_is_vendor() ) {
  3.         return false;
  4.     }
  5.     return $is_purchasable;
  6. }
  7. add_filter( 'woocommerce_is_purchasable', 'limit_purchases_by_role', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement