Use handler for add-to-cart button text also

Related to SHA: bd78ca6
This commit is contained in:
Brent Shepherd 2013-03-01 14:52:04 +10:00
parent d8282b9a98
commit 4edd972644
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ global $product;
'class' => ''
);
switch ( $product->product_type ) {
$handler = apply_filters( 'woocommerce_add_to_cart_handler', $product->product_type, $product );
switch ( $handler ) {
case "variable" :
$link['url'] = apply_filters( 'variable_add_to_cart_url', get_permalink( $product->id ) );
$link['label'] = apply_filters( 'variable_add_to_cart_text', __( 'Select options', 'woocommerce' ) );