add_to_cart filter added in loop/add-to-cart.php

Needed by Product Bundles extension to avoid overriding this file.
Finally, no templates files are overridden.
This commit is contained in:
Manos Psychogyiopoulos 2012-07-06 15:29:12 +03:00
parent 3d02d1a238
commit 73214c421d
1 changed files with 7 additions and 7 deletions

View File

@ -30,8 +30,8 @@ if( $product->get_price() === '' && $product->product_type != 'external' ) retur
$label = apply_filters( 'external_add_to_cart_text', __('Read More', 'woocommerce') ); $label = apply_filters( 'external_add_to_cart_text', __('Read More', 'woocommerce') );
break; break;
default : default :
$link = esc_url( $product->add_to_cart_url() ); $link = apply_filters( 'add_to_cart_url', esc_url( $product->add_to_cart_url() ), $product );
$label = apply_filters('add_to_cart_text', __('Add to cart', 'woocommerce')); $label = apply_filters( 'add_to_cart_text', __('Add to cart', 'woocommerce'), $product );
break; break;
} }