Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #839961

    pmason
    Participant

    Hi there.

    I have X theme installed with a child theme and the woocommerce plugin. I’ve added weights to my product so that I can create shipping classes, but I don’t want to have that attribute displayed in the Product Additional Information tab. There doesn’t appear to be a class assigned to the table row that it is displayed within. How would I remove it from the display please? Happy to use css or make amendments to templates, I just need a bit of direction.

    Development site is at http://borntoodie.com.gridhosted.co.uk

    Thanks,

    Phil.

    #839995

    Thai
    Moderator

    Hi Phil,

    Try adding the following code under Customizer > Custom > Javascript:

    jQuery(".single-product td.product_weight").prev().remove();
    jQuery(".single-product td.product_weight").remove();

    Hope it helps 🙂

    #840000

    pmason
    Participant

    Got sorted thanks. In case anybody else has this issue here’s what I did. I copied the file at woocommerce/templates/single-product/product-attributes.php to my-child-x-theme/woocommerce/single-product/product-attributes.php, updated the relevant row in the code by adding a unique class and then in my css file adding

    .my-unique-class {display:none;}

    #840001

    pmason
    Participant

    Thanks staff for your alternative solution! I’ll keep this in mind if I run into problems in the future.

    #840031

    Christopher
    Moderator

    You’re welcome.

    Let us know if you have further questions.