• Resolved csit

    (@calmsmile)


    When I update wordpress 6.2.1 and the my-account page only output the [woocommerce_my_account] string on the page

    I use the block theme, and my-account page I use my custom template and insert my custom partten and the follow is my pattern code:

    <!-- wp:group {"layout":{"type":"constrained"}} -->
    <div class="wp-block-group"><!-- wp:shortcode -->
    [woocommerce_my_account]
    <!-- /wp:shortcode --></div>
    <!-- /wp:group -->

    in my custom template.html and the Woocommerce my-account page shortcode will not work and only output the ‘[woocommerce_my_account]’ string on the page.

    • This topic was modified 1 year, 6 months ago by csit.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @calmsmile,

    Thank you for reaching out!

    I tried adding your exact same code in the Twenty Twenty-Three theme and “my-account” page is working as expected.


    Link to image: https://d.pr/i/ruERON


    Link to image: https://d.pr/i/P4w6EG

    Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.


    It’s also worth checking if there are any fatal error logs from WooCommerce > Status > Logs and choosing from the drop-down menu the fatal-errors.log option.

    Look forward to hearing back from you.

    Thread Starter csit

    (@calmsmile)

    my account code structure : wp-content/themes/my-theme/patterns/my-account.php

    <?php
    /**
     * Title: My Account pattern
     * Slug: my-theme/account
     */
    
     ?>
    
    
    <!-- wp:group {"layout":{"type":"constrained"}} -->
    <div class="wp-block-group"><!-- wp:shortcode -->
    [woocommerce_my_account]
    <!-- /wp:shortcode --></div>
    <!-- /wp:group -->

    my theme templates code structure : wp-content/themes/my-theme/templates/my-account.html

    <!-- wp:pattern {"slug":"my-theme/account"} /-->

    my theme templates code structure : wp-content/themes/my-theme/theme.json

    {
        "$schema": "https://schemas.wp.org/wp/6.1/theme.json",
        "customTemplates": [
            
            {
                "name": "my-account",
                "title": "My Account"
            },
        ],
        "version": 2,
    }

    then edit a page and select a page template choose our custom template My Account

    then the page will only output the [woocommerce_my_account] string.

    Hi @calmsmile

    Thanks for providing further information about your issue here.

    I understand that you are using a custom template to display the My Accounts page.

    This is a bit of a complicated topic that would need some customization to address. Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[woocommerce_my_account] not work after update wordpress 6.2.1’ is closed to new replies.