Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Niels Lange

    (@nielslange)

    Hello @alejorostata,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the following places for more development-oriented questions:

    1. WooCommerce Slack Community: https://woocommerce.com/community-slack/
    2. WooCommerce FB group: https://www.facebook.com/groups/advanced.woocommerce/

    That said, have you already tried fetching the sub-endpoint using the WordPress function get_query_var()?

    Thread Starter panda

    (@alejorostata)

    Nevermind,

    global $wp;
    $current_url = home_url(add_query_arg(array(),$wp->request));
    $billing = home_url('/account/edit-address/billing');
    
    if(is_wc_endpoint_url('edit-address') && $current_url === $billing){ 
       echo 'Currently displayed page is billing.';
    }
    Plugin Support Missy a11n

    (@m155y5)

    Automattic Happiness Engineer

    I’m glad you were able to get this worked out. I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to check for current endpoint and sub-endpoint?’ is closed to new replies.