woocommerce_add_to_cart_product_id, absint( wp_unslash( $_REQUEST[add-to-cart]

woocommerce_add_to_cart_product_id, absint( wp_unslash( $_REQUEST[add-to-cart]

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.11.0.0

apply_filters('woocommerce_add_to_cart_product_id, absint( wp_unslash( $_REQUEST[add-to-cart]') is found 1 times:

  • /includes/class-wc-form-handler.php line 920
    		}
    
    		wc_nocache_headers();
    
    		$product_id        = apply_filters( 'woocommerce_add_to_cart_product_id', absint( wp_unslash( $_REQUEST['add-to-cart'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    		$was_added_to_cart = false;
    		$adding_to_cart    = wc_get_product( $product_id );
    
    		if ( ! $adding_to_cart ) {
    			return;
    		}