I managed to find the soulution:
add_action('woocommerce_after_add_to_cart_button', 'wc_min_quantity',10,2);
function wc_min_quantity($product)
{
if(function_exists('icl_object_id')) {
$default_language = wpml_get_default_language();
$prodid = icl_object_id($product->get_id(), 'product', true, $default_language);
} else {
$prodid = $product->id;
}
$prodid = get_the_ID();
$minQty = get_post_meta($prodid, '_wc_mmax_min', true);
if ($minQty > 0) {
}
echo "Minimum order quantity: $minQty";
}
Related Posts:
- Activate a plugin through PHPMyAdmin or FTP?
- Get a list of all WordPress.org Plugins?
- Where can I find a schema of wordpress plugin core architecture?
- How do I make my plugin load before the headers are output so I can redirect wordpress?
- Sell one unique item with Woocommerce? [closed]
- Make thumbnails in woocommerce replace the main image instead of opening fancybox
- Content generator for development site [closed]
- Add Rewrite Rule for custom page
- plugin_action_links Filter Hook Deprecated?
- PHP Deprecated: Non-static method should not be called statically
- Why can I not use a class constant as text domain?
- Remove Widgets in Dashboard
- Deactivate plugins using Migrate DB’s find and replace options
- Trying to get logged-in user data inside php class
- Prevent Brute Force Attack
- Add agenda items and notifications
- Check if a class exists within a method
- Disable wordpress from including jQuery in the head section
- Admin-ajax.php is dying “0” without processing function
- Woocommerce Shipping module available only for type of products [closed]
- WooCommerce – Adding Custom Order Without No Product [closed]
- How to remove an Ajax action
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Plugin jQuery version VS Theme jQuery version: search for best practice
- How can I pass a variable to a page with a SEF url?
- Opendir and WordPress Path
- Multiple files in a plugin
- Gutenberg Blocks – Change EDIT part of the block using editor.BlockEdit filters. How to change the markup?
- Randomize attachment IDs
- how can I link to a PlugIn admin-sub-menu page after processing a formular
- How to associate more than one user to a post?
- Remove rewrite rules generated by plugin during deactivation
- Error shown for Trying to get property ‘roles’ of non-object in WordPress After Content for User Roles
- Call to a member function have_posts() on a non-object on normal loop
- How to show Recent Page instead of Post?
- custom changes removed after plugin update
- Woo Commerce Variations [closed]
- wp_set_auth_cookie causes 403 error in the wooCommerce checkout
- Not able to add option in Sub-Menu under page
- Allow HTML in Excerpts in Elementor
- wp_schedule_single_event not working: cron job is triggered but nothing gets executed
- add image crop function like in wp customizer
- Problem In Advance search Plugin [closed]
- jQuery for custom plugin not working with Divi theme
- Front end inline editing?
- Post Comments with Ajax in WordPress
- Execute js files doesn’t seem to work
- options creation for plugins
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Slider/text combination plugin
- How to disable a widget when dependent plugin is inactive?
- Allowed memory size exhausted problem
- How can i force wp-admin to use 2-column dashboard layout? [closed]
- First plugin, problem with get_pages
- How to keep track of new plugins published on wordpress.org?
- Is this a plug-in in wordpress or a custom JavaScript
- How to automatically redirect to custom admin menu after plugin activation?
- Readable titles in mobile
- adding Adsense’s In-Article Ads between images of blog post
- Export postmeta (custom fields)
- Inserting shortcode in href – any ideas or workarounds?
- Convert to shortcode?
- Add logo to admin menu in my plugin
- Load CSS files in header of Bones theme?
- Trying to get property of non-object wordpress error message
- Problem with ajax plugin for refreshing posts
- Advertising: Every page refresh counts as 3 ad impressions
- Google Maps with categories
- Trying to extend a plugin’s functionality
- WordPress Cache delete on plugin uninstall
- How to create repeater field manually, without plugin (ACF Pro)?
- Should I use the action in the plugin’s main file?
- Jquery POST Ajax Return null data in wordpress
- How to get specific column data conditionally in database in WordPress?
- WpForms email notification displays the shortcode as variable instead of value
- How to create a folder in wordpress that will contain pages?
- Ajax Call not Working in Plugin
- Store GravityForm data in phpmyadmin (mysql)
- How to remove WordPress Default Comment? not Facebook
- Call function with button and return response
- Notice: unserialize(): Error at offset 0 of 1 bytes in plugin Accordion on WordPress
- updraft plus migrator problem [duplicate]
- Missing files in enqueue actions causes WordPress to reload
- Adding/ Removing actions for plugins
- Why user profile update creates Additional Capabilities
- Add new post using a page inside the website
- Adding list of Indexes in wordpress document
- API calls on plugin activation or init?
- Get page content by ID (from a plugin)
- how to protect wordpress website
- Unfortunately removed myself as plugin committer
- Plugin won’t activate, fatal error (widget class not found)
- Google analytics not working on WordPress
- Is it possible to recover Deleted users?
- ACF Taxonomy Object term Null [closed]
- Remove on behalf of in wordpress emails?
- Plugin problem. Question is not appearing.
- Embed php code in custom field of a plugin [closed]
- How to make a rest style plugin?