20% Off Awaits: Use Code WOLPER20 Today!

Test Page For Container

Update: Detecting specifically the My account “Dashboard” page

<?php
    global $wp;
    $request = explode( '/', $wp->request );

    // If NOT in My account dashboard page
    if( ! ( end($request) == 'my-account' && is_account_page() ) ){ 
?>
    <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id')); ?>">Back to my Account Dashboard</a>
<?php 
    } 
?>

<div class="myaccount_content">
    <?php
        do_action( 'woocommerce_account_content' );
    ?>
</div>

Tested and works.


Original answer:

Yes of course there is is_account_page() native WooCommerce conditional that returns true on the customer’s account pages.

×

Product details

0