Missing functions from master

This commit is contained in:
Mike Jolley 2016-02-10 14:40:46 +00:00
parent fab8a871aa
commit 116e70f6dd
1 changed files with 30 additions and 0 deletions

View File

@ -883,6 +883,36 @@ function wc_transaction_query( $type = 'start' ) {
}
}
/**
* Gets the url to the cart page.
*
* @since 2.5.0
*
* @return string Url to cart page
*/
function wc_get_cart_url() {
return apply_filters( 'woocommerce_get_cart_url', wc_get_page_permalink( 'cart' ) );
}
/**
* Gets the url to the checkout page.
*
* @since 2.5.0
*
* @return string Url to checkout page
*/
function wc_get_checkout_url() {
$checkout_url = wc_get_page_permalink( 'checkout' );
if ( $checkout_url ) {
// Force SSL if needed
if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
}
}
return apply_filters( 'woocommerce_get_checkout_url', $checkout_url );
}
/**
* Register a shipping method.
*