This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// display max quantity allowed if set on single product page | |
add_action('woocommerce_single_product_summary', 'maxquantityallowed', 30); | |
function maxquantityallowed() { | |
if(get_post_meta( get_the_ID(), 'maximum_allowed_quantity', true ) ){ | |
echo 'Maximum quantity allowed for this product is <strong>'. get_post_meta( get_the_ID(), 'maximum_allowed_quantity', true ) .'</strong>. Request a custom quote for bulk orders.'; } | |
} |