How To Get WooCommerce Page IDs

Check how to programmatically retrieve the ID of pages created by WooCommerce.

get_option( 'woocommerce_shop_page_id' ); // Shop Page
get_option( 'woocommerce_cart_page_id' ); // Cart Page
get_option( 'woocommerce_checkout_page_id' ); // Checkout Page
get_option( 'woocommerce_pay_page_id' ); // Payment Page
get_option( 'woocommerce_thanks_page_id' ); // Order Summary Page
get_option( 'woocommerce_myaccount_page_id' ); // Login/Register/My Account Page
get_option( 'woocommerce_edit_address_page_id' ); // Edit Address Page
get_option( 'woocommerce_view_order_page_id' ); // Single Order Page
get_option( 'woocommerce_terms_page_id' );  // T&C Page

Leave a Comment

Your email address will not be published. Required fields are marked *