Merge pull request #2552 from thenbrent/add-to-cart-button-handler

Use handler for add-to-cart button text also
This commit is contained in:
Mike Jolley 2013-03-01 08:13:36 -08:00
commit 4eb00fa281
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' ) );