Modify woocommerce product page - by pjlm

This topic has 12 replies, 3 voices, and was last updated 4 years ago ago by Rose Tyler

  • Avatar: pjlm
    pjlm
    Participant
    January 28, 2021 at 15:28

    hi,
    I would like to add some content to any woocommerce product pages, but it’s not working.
    I’m trying to do this:

    add_action( ‘woocommerce_before_single_product_summary’, ‘adding_sample_test’, 5 );
    function adding_sample_test(){
    echo(‘hi there, this is a sample test’);
    };

    Please, could you help me?

    thanks

    Please, contact administrator
    for this information.
    11 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 28, 2021 at 19:38

    Hello,

    Provide us with WP Dashboard and FTP access to your site we’ll check why it does not work for you.

    Regards

    Avatar: pjlm
    pjlm
    Participant
    January 28, 2021 at 20:04

    please, check private content area
    thanks

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    January 29, 2021 at 17:59

    Hello,

    We don’t see login form https://prnt.sc/xtiwik
    FTP also does not work https://prnt.sc/xtkqi3

    Regards

    Avatar: pjlm
    pjlm
    Participant
    January 30, 2021 at 18:48

    hi there,
    please, check again (private content)
    thanks

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 1, 2021 at 09:22

    Hello,

    We can’t see the login form still – https://prnt.sc/xymgik Is there restriction by IP or something else?

    Regards

    Avatar: pjlm
    pjlm
    Participant
    February 1, 2021 at 17:37

    hi
    there is no restriction
    please, check again

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 2, 2021 at 15:34

    Hi,

    If you are using Single Product Builder most default woocommerce actions are not available due to building system.
    If you want to use some customizations of single product:
    1/ You can disable Single product and add/remove actions for woocommerce default ones
    2/ You can rewrite woocommerce/content-single-product-builder.php via your child-theme/woocommerce/ and make all changes there (but check for compatibilities with theme updates)

    Regards

    Avatar: pjlm
    pjlm
    Participant
    February 2, 2021 at 16:00

    How could I know wich hook you are using in single product builder?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 3, 2021 at 10:07

    Hello,

    It looks like you do not use the Single product builder right now.
    FTP access is not working, admin not allowed access to the Dashbord. Please check.
    You can try yourself to change you code in child-theme/functions.php
    to

    add_action( 'wp', function() {
    add_action( 'woocommerce_before_single_product_summary', function(){
    echo('hi there, this is a sample test');
    }, 5 );
    }, 70 );

    Regards

    Avatar: pjlm
    pjlm
    Participant
    February 3, 2021 at 10:22

    Hi there,
    if I wanted to use the Single product builder, which hook should I use to show the “sample test” ?
    thanks

    add_action( ‘wp’, function() {
    add_action( ‘xxxxxxxxxxxxxxxxxxxxxxxx’, function(){
    echo(‘hi there, this is a sample test’);
    }, 5 );
    }, 70 );

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 3, 2021 at 13:18

    Hi,

    In this case, edit in files is not obligatory, you can use elements of the Single product builder, for example – https://xstore.8theme.com/demos/2/niche-market/product/velvet-form-chairs/ https://prnt.sc/y59k4h or https://prnt.sc/y59n2j https://prnt.sc/y59p8l

    Regards

  • Viewing 12 results - 1 through 12 (of 12 total)

The issue related to '‘modify woocommerce product page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.