From 4edd972644404e672399dffc8c3221af6295c87f Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Fri, 1 Mar 2013 14:52:04 +1000 Subject: [PATCH] Use handler for add-to-cart button text also Related to SHA: bd78ca6 --- templates/loop/add-to-cart.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/loop/add-to-cart.php b/templates/loop/add-to-cart.php index e018bff6f38..a01cb9ab9b9 100644 --- a/templates/loop/add-to-cart.php +++ b/templates/loop/add-to-cart.php @@ -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' ) );