How to check for current endpoint and sub-endpoint?
-
Let’s say the URL is
https://example.com/my-account/edit-address/billing
https://example.com/my-account/edit-address/shippingI’m trying to check if the current endpoint displaying is
billing
orshipping
using is_wc_endpoint_url. But this doesn’t seem to work.I tried;
if(is_wc_endpoint_url('billing')){ ... } is_wc_endpoint_url('edit-address/billing'){ ... }
All of the above is not working. However, the below code is working for
edit-address
endpoint;is_wc_endpoint_url('edit-address'){ ... }
is
billing
andshipping
are sub-endpoint ofedit-address
? How can I check for it?
Viewing 3 replies - 1 through 3 (of 3 total)
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.