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
 
 
 
 

Post data using curl

$aUrl = '####';
$aData= array('key1' => 'val1','key2' => 'val2');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($aData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
Share on Google+Share on FacebookTweet about this on TwitterEmail this to someone