This quick guide shows you how to add any custom content under the product price on the WooCommerce Product Archive template. You may wish to show a shipping notice, promotion, or in our example “Price Match Promise”. This code snippet shows the custom text on all products on the archive page. To target individual products, you’ll simply need to wrap the echo output in an of statement where the product equals the product ID. Enjoy!
/**
* Snippet Name: Add custom content under price on product archive loop items
* Snippet Author: ecommercehints.com
*/
function ecommercehints_woocommerce_after_shop_loop_item( ) {
echo 'Price Match Promise';
};
// add the action
add_action( 'woocommerce_after_shop_loop_item', 'ecommercehints_woocommerce_after_shop_loop_item', 1, 0 );