Ledger Nano X - The secure hardware wallet
SHARE
TWEET

WooCommerce - Increase the variations threshold

lorro May 15th, 2020 (edited) 1,270 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // WooCommerce - Increase the variations threshold (the default is usually 30)
  3.   // Credit: mohsinoffline
  4.   // User kanlailey reported this doesn't work if the WooCommerce Stripe plugin is active
  5.   add_filter( 'woocommerce_ajax_variation_threshold', 'custom_variation_threshold', 10, 2 );
  6.   function custom_variation_threshold( $default, $product ) {
  7.     return 60; // set this number to your maximum number of variations
  8.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top