woocommerce_add_to_cart_handler_

woocommerce_add_to_cart_handler_

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

do_action('woocommerce_add_to_cart_handler_') is found 1 times:

  • /includes/class-wc-form-handler.php line 812
    			$was_added_to_cart = self::add_to_cart_handler_variable( $product_id );
    		} elseif ( 'grouped' === $add_to_cart_handler ) {
    			$was_added_to_cart = self::add_to_cart_handler_grouped( $product_id );
    		} elseif ( has_action( 'woocommerce_add_to_cart_handler_' . $add_to_cart_handler ) ) {
    			do_action( 'woocommerce_add_to_cart_handler_' . $add_to_cart_handler, $url ); // Custom handler.
    		} else {
    			$was_added_to_cart = self::add_to_cart_handler_simple( $product_id );
    		}
    
    		// If we added the product to the cart we can now optionally do a redirect.
    		if ( $was_added_to_cart && 0 === wc_notice_count( 'error' ) ) {