add to cart hook tweak

This commit is contained in:
Mike Jolley 2011-09-21 16:26:23 +01:00
parent c3ab943444
commit 438b31f9a6
2 changed files with 6 additions and 6 deletions

View File

@ -50,11 +50,11 @@ add_action('woocommerce_after_single_product', 'woocommerce_upsell_display');
/* Product Add to cart */
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30, 2 );
add_action( 'simple_add_to_cart', 'woocommerce_simple_add_to_cart' );
add_action( 'virtual_add_to_cart', 'woocommerce_simple_add_to_cart' );
add_action( 'downloadable_add_to_cart', 'woocommerce_downloadable_add_to_cart' );
add_action( 'grouped_add_to_cart', 'woocommerce_grouped_add_to_cart' );
add_action( 'variable_add_to_cart', 'woocommerce_variable_add_to_cart' );
add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart' );
add_action( 'woocommerce_virtual_add_to_cart', 'woocommerce_simple_add_to_cart' );
add_action( 'woocommerce_downloadable_add_to_cart', 'woocommerce_downloadable_add_to_cart' );
add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart' );
add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart' );
/* Product Add to Cart forms */
add_action( 'woocommerce_add_to_cart_form', 'woocommerce_add_to_cart_form_nonce', 10);

View File

@ -254,7 +254,7 @@ if (!function_exists('woocommerce_sharethis_script')) {
**/
if (!function_exists('woocommerce_template_single_add_to_cart')) {
function woocommerce_template_single_add_to_cart( $post, $_product ) {
do_action( $_product->product_type . '_add_to_cart' );
do_action( 'woocommerce_' . $_product->product_type . '_add_to_cart' );
}
}
if (!function_exists('woocommerce_simple_add_to_cart')) {