How to get woocommerce page urls

Shop Url

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

Cart Url

global $woocommerce;
$aUrl = $woocommerce->cart->get_cart_url();

Checkout Url

global $woocommerce;
$aUrl = $woocommerce->cart->get_checkout_url();

Account Url

$aAccountPageId = get_option( 'woocommerce_myaccount_page_id' );
$aUrl = get_permalink( $aAccountPageId );
Share on Google+Share on FacebookTweet about this on TwitterEmail this to someone
  

How to create wordpress theme woocommerce supportable

(1) Add following code in functions.php file

function your-theme-name_setup() {
   add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'your-theme-name_setup' );

(2)Create a folder “woocommerce” in your theme
(3)Copy template file from “wp-content\plugins\woocommerce\templates” and paste into “wp-content\themes\your-theme-name\woocommerce”

Share on Google+Share on FacebookTweet about this on TwitterEmail this to someone
  
Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.