woocommerce_ajax_added_to_cart

woocommerce_ajax_added_to_cart

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_ajax_added_to_cart') is found 1 times:

  • /includes/class-wc-ajax.php line 478
    		}
    
    		if ( $passed_validation && false !== WC()->cart->add_to_cart( $product_id, $quantity, $variation_id, $variation ) && 'publish' === $product_status ) {
    
    			do_action( 'woocommerce_ajax_added_to_cart', $product_id );
    
    			if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
    				wc_add_to_cart_message( array( $product_id => $quantity ), true );
    			}
    
    			self::get_refreshed_fragments();