Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: URLs for WooCommerce utility pages (cart, checkout, etc)
<!-- Get and display the My Account page url -->
<?php echo get_permalink( wc_get_page_id( 'checkout' ) ); ?>
<!-- Get and display the Cart page url -->
<?php echo get_permalink( wc_get_page_id( 'cart' ) ); ?>
<!-- Get and display the Shop page url -->
<?php echo get_permalink( wc_get_page_id( 'shop' ) ); ?>
<!-- Get and display the Checkout page url -->
<?php echo get_permalink( wc_get_page_id( 'myaccount' ) ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.