Adding custom fields to product page (compact)
-
Hi Xtemos-Team,
what is the best way to output a custom field value on the product page?
I would like to show the shipping-fee (_shipping) under the products price
(see link below)
Child > modify php on product-page file > ?
Thanks for your help 😉
Till
Hello,
Thank you for the question.
You can easily hook your text after the price by adding the following code snippet to the functions.php file in your child theme
add_action( 'woocommerce_single_product_summary', 'custom_price_message', 11 );
function custom_price_message() {
echo ' + $15 shipping fee';
}
Regards
again – worked like a charm.
Thank you!
Till
Great, you are welcome 🙂
The topic ‘Adding custom fields to product page (compact)’ is closed to new replies.