Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wooxperto/f0a62021d0dd55f5bc23f5d339d809e9 to your computer and use it in GitHub Desktop.
Save wooxperto/f0a62021d0dd55f5bc23f5d339d809e9 to your computer and use it in GitHub Desktop.
Add to Cart Quantity Suffix at Single Product page on WooCommerce
<?php
/**
* @snippet Add suffix after quantity input field at single proudct page | WooCommerce
* @author WooXperto
* @date 04.09.2023
*/
if( ! function_exists("wooXperto_add_to_cart_quantity_input_suffix")){
function wooXperto_add_to_cart_quantity_input_suffix(){
echo "<span class='qty_suffix'>Liters</span>";
}
}
add_action("woocommerce_after_quantity_input_field","wooXperto_add_to_cart_quantity_input_suffix");
@wooxperto
Copy link
Author

Add suffix after quantity input field at single product page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment