Home Forums Basel support forum Adding custom fields to product page (compact)

Adding custom fields to product page (compact)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6421

    mobiflora
    Participant

    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

    #6429

    Artem Temos
    Keymaster

    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

    #6444

    mobiflora
    Participant

    again – worked like a charm.

    Thank you!

    Till

    #6447

    Artem Temos
    Keymaster

    Great, you are welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Adding custom fields to product page (compact)’ is closed to new replies.