Get WooCommerce Page URLs

Hi, here is the complete guide to getting the WooCommerce page URLs in your custom theme or plugin. Get the checkout page URL, cart page URL, my account page URL and more…

Checkout page link

wc_get_checkout_url();

 

Cart page link

wc_get_cart_url();

 

Logout page link

wc_logout_url();

 

Lost password page link

wc_lostpassword_url();

 

Customer edit account page link

wc_customer_edit_account_url();

 

Shop page link

$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );

 

My account page link

$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );
if ( $myaccount_page_id ) {
  $myaccount_page_url = get_permalink( $myaccount_page_id );
}

Leave a Reply

SEARCH AWESOME STUFF

Our customer support team is here to answer your questions. Ask us anything!
WeCreativez WhatsApp Support
Developer
Sonu Kaushal
Available
WeCreativez WhatsApp Support
Sale Support
Ankita Kajal
Available
WeCreativez WhatsApp Support
Customer Support
Shruti Anandam
Away