Skip to content

Commit

Permalink
replace get_product_url with add_to_cart_url
Browse files Browse the repository at this point in the history
  • Loading branch information
SiR-DanieL committed May 5, 2015
1 parent af6998f commit fe6f680
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/wc-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,13 +883,14 @@ function woocommerce_variable_add_to_cart() {
function woocommerce_external_add_to_cart() {
global $product;

if ( ! $product->get_product_url() )
if ( ! $product->add_to_cart_url() ) {
return;
}

wc_get_template( 'single-product/add-to-cart/external.php', array(
'product_url' => $product->get_product_url(),
'button_text' => $product->single_add_to_cart_text()
) );
'product_url' => $product->add_to_cart_url(),
'button_text' => $product->single_add_to_cart_text()
) );
}
}

Expand Down

0 comments on commit fe6f680

Please sign in to comment.