• Resolved Xandro

    (@sudarshankotian)


    Hi, in my account section > https://prnt.sc/u5ioVtOp85Qc can we remove or hide it for some reason? through code in functions.php?

    As we don’t really need recent orders, addresses, shipping & billing mentioned, so is it possible to remove that paragraph?

    Thank you. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    so is it possible to remove that paragraph?

    Try this CSS .woocommerce-MyAccount-content p:nth-child(3) {display: none;}

    Kind regards,

    Thread Starter Xandro

    (@sudarshankotian)

    Hi, @conschneider thanks for the help, I will try this method too. For now, I got it worked by just copying the dashboard.php to theme/woocommerce/my-account and removed the paragraph.

    Only drawback seems to be I may have to add this to root file, if there’s any new update for the theme available in future.

    Thanks anyway will try this method.

    Thread Starter Xandro

    (@sudarshankotian)

    Hi, @conschneider your mentioned CSS method is not working.

    Panos (a11n)

    (@panagiotissynetos)

    Hey @sudarshankotian

    Your approach to copying the file to the theme, is the recommended way to override WooCommerce’s templates in your theme.

    Your concern is valid, but since it’s a very minor change, when there is an update, you could copy the file again and remove the paragraph. I understand it’s not optimal but it’s not a file that gets updated often, last time it was in version 4.4.0.

    As for the CSS, I tried what @conschneider suggested and it worked fine in the Storefront theme.

    You might need to experiment with the p:nth-child(3) selector and try 2 or 4 as you might have fewer or more paragraphs.

    Check out my screenshot https://take.ms/WxuN5 for further guidance

    Let me know if it helped. If not, please share a screenshot of the whole page so I can further investigate.

    Panos

    Panos (a11n)

    (@panagiotissynetos)

    Hey @sudarshankotian , on a second thought, the CSS snippet that we’ve send you has a glitch; it’s too generic and it would hide ALL nth-child paragraph tags regardless of what my-account tab the customer is on.

    I’m sorry for that.

    Another possible solution would be to use Loco Translate https://www.ads-software.com/plugins/loco-translate/ and change the following two texts

    __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">billing address</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' )

    and

    __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' )

    to an empty string and it would prevent the text from appearing.

    Let me know if that works for you
    Panos

    Thread Starter Xandro

    (@sudarshankotian)

    Hi, @panagiotissynetos thanks for the detailed explanation on this.

    I already tested through other options to hide that specific paragraph, but as you mentioned I faced the same issue other texts were also not visible like in account settings section.

    Yes, Loco translation also looks good option but we already have other setup for translation, don’t want to ruin that. ??

    So, for now keeping the copy of (removed that para as you mentioned) dashboard.php in theme/woocommerce/my-account seems a good option.

    But I guess having a child theme is still the best way to not get bothered my theme updates and having a customized setup. ??

    Plugin Support con

    (@conschneider)

    Engineer

    Hi again,

    I got one more idea for you. https://www.ads-software.com/plugins/real-time-find-and-replace/ will allow you to replace / remove the string on the fly.

    But I guess having a child theme is still the best way to not get bothered my theme updates and having a customized setup. ??

    That should work, yes :).

    Kind regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘My account section customization’ is closed to new replies.