Skip to content

Commit

Permalink
Merge pull request woocommerce#8117 from SiR-DanieL/patch-1
Browse files Browse the repository at this point in the history
Replace get_product_url with add_to_cart_url
  • Loading branch information
mikejolley committed May 8, 2015
2 parents b54a7a3 + fe6f680 commit fa94a7c
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 fa94a7c

Please sign in to comment.