In the bleeding edge of WooCommerce 2.1 you can filter woocommerce_quantity_input_min
and woocommerce_quantity_input_step
directly. That should get you 6,12,18, etc. I have no idea if these filters are in WC2.0.?. Note the $product object is passed to the filter in case you don’t want this to be a universal change. You can get the bleeding edge of WooCommerce from github, though it probably isn’t advisable to use it in production yet.
function wpa116693_filter_min_quantity( $min, $product ){
return 6;
}
add_filter( 'woocommerce_quantity_input_min', 'wpa116693_filter_min_quantity', 10, 2 );
function wpa116693_filter_quantity_step( $step, $product ){
return 6;
}
add_filter( 'woocommerce_quantity_input_step', 'wpa116693_filter_quantity_step', 10, 2 );
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]
- How to check if the product is in a certain category on a single-product.php in Woocommerce?
- Modifying a JS file with data from plugin settings
- Plugin upgrading: Widget settings
- Create a table in custom plugin on the activating it?
- How to call plugin path in JS?
- Multi domain, multi sites with different themes and content
- Getting Custom Post Type content from main-site of a Multisite
- Editor not displaying dynamically after clicking on the button
- $current_user var returns NULL
- Quote rotator in the sidebar
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Very stubborn wp_register_script / add_action vs remove
- remove filter which calls a public static function
- How to submit documentation with plugin
- Placement of Code in Plugin for hooking `save_post`
- How can plugins have their own pages?
- Create template “author” with a plugin
- Why is the generated POT file from WordPress.org not adding my plugin description to the POT file?
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- Bouncing scroll
- Reusable functions and tools (Framework)
- Executing my function once on a specific time
- Override Javascript in a Plugin?
- Preview featured image using frontend post plugin
- Globally register styles but enqueue them selectively
- Creating a plugin to sanitize comment and the url field before display only
- Debugs/errors in oqey gallery
- Does using WP-cron make the site slower for the user?
- Ultimate Member [closed]
- uninstall.php does not appear to trigger when uninstalling my plugin
- Why “Call to a member function on a non-object” in plugin only?
- Auto move media file to cloud
- Best place to load wp_ajax_the_ajax_hook action in plugin
- jQuery.post not working within shortcode – WordPress Ajax
- Login cookies set as wrong domain
- Change the display of Settings API (do_settings_sections)
- My WordPress website was hacked [closed]
- Create Table on Plugin Activation
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- How to backup single post in wordpress [closed]
- archive_template override when no posts exist
- How can I modify admin bar only if my plugin is loaded
- How to execute a plugin on a single page only?
- Allowing users to Sign-up > Login > Post articles that need approval
- What is a good plugin for making a template that can be reused to make several objects on a single page?
- Hotel reservation plugin you would recommend [closed]
- standard custom page template hierarchy for plugins
- WordPress – source link plugin – how to modify it?
- Index.php using 100% CPU [closed]
- How to write to a separate PHP file in plugin settings
- Custom CSS not being added by plugin
- plugin inside a wordpress theme
- How do i specify a url to which to redirect the user after he logs out from facebook?
- hardcoded wp pages/plugins problems
- Managing media by folder
- Gantry Framework: new page loads homepage content instead of page content
- What’s the best way to echo out a filter variable?
- How to show multi line output from metabox
- How to keep plugin (media-sync) running even the tab is closed?
- Load CSS before Theme CSS
- Visual composer custom element error
- Attempting to list all product categories and the price range of all products within them
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- A dynamic table plugin to get user input
- What plugin would make this happen? If is the theme
- translate wordpress website from english to arabic
- when i activate my WordPress plugin cannot see customizer options or preview
- Writing SEO for Homepage when homepage is set to display latest posts
- multiple image upload using wp_enqueue_media
- How to Modify WordPress Plugin Placement/Position on Post Page?
- Plugin Options Page and Subpage
- Protect WordPress option value
- wp rest api (v2) filter not working (404 error – rest_no_route)
- WordPress PHP error getting posts from another wordpress blog
- ABSPATH doesn’t work
- Edit plugin filter
- can’t use span or icon tags on when editing visual composer element
- WordPress crob job performance
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- How to disable wordpress page rewrite rule?
- Programmatically retrieve the sidebar/s classes
- How know the “admin” blog from wordpress multisite?
- AJAX doesn’t pass variables to the php function in the plugin
- Modifying WordPress XML-RPC Built-Ins
- wp_query for more fields plugin
- contact 7 plugin stops some pages from working properly
- WordPress “Categories to tag converter” not working on imported Blogger posts
- Shortcode return is printing a 1 afterward
- Upload Image to desired directory through plugin
- Fast Tranfering my WordPress site to another server
- Display out of stock products in WooCommerce [closed]
- How to give access to the particular page in wordpress for specific username/email NOT roles [closed]
- How can i store cache of wordpress a database request without plugins?
- disabled plugin and now wordpress won’t load
- How to provide page_template path in custom plugin using WordPress
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- Issues with creating user profile for a subscriber, but with different profile page and functionalities