vapvarun

Allow multiple gigs at a time from same vendor

Jan 19th, 2021 (edited)
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. add_filter( 'woocommerce_quantity_input_max', 'woo_sell_service_test_quantity_input_max', 20 ,2 );
  2. function woo_sell_service_test_quantity_input_max( $max_value, $product ) {
  3.     if ( 'yes' == get_post_meta( $product->get_id(), '_wss_type', true ) ){
  4.         update_post_meta( $product->get_id(), '_sold_individually', '' );
  5.     }
  6.     return $max_value;
  7. }
Add Comment
Please, Sign In to add comment