internal_woocommerce_cart_item_added_from_user_request

internal_woocommerce_cart_item_added_from_user_request

Appears in:
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.10.6.1

do_action('internal_woocommerce_cart_item_added_from_user_request') is found 3 times:

  • /includes/class-wc-ajax.php line 541
    			 * @param int|float $quantity   Quantity added to the cart.
    			 *
    			 * @since 10.6.0
    			 */
    			do_action( 'internal_woocommerce_cart_item_added_from_user_request', $variation_id ? $variation_id : $product_id, $quantity );
    
    			if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
    				wc_add_to_cart_message( array( $product_id => $quantity ), true );
    			}
    
    			self::get_refreshed_fragments();
    
  • /includes/class-wc-form-handler.php line 887
    			 * @param int|float $quantity   Quantity added to the cart.
    			 *
    			 * @since 10.6.0
    			 */
    			do_action( 'internal_woocommerce_cart_item_added_from_user_request', $product_id, $quantity );
    
    			$url = apply_filters( 'woocommerce_add_to_cart_redirect', $url, $adding_to_cart );
    
    			if ( $url ) {
    				wp_safe_redirect( $url );
    				exit;
    
  • /src/StoreApi/Routes/V1/CartAddItem.php line 143
    			 * @param int|float $quantity   Quantity added to the cart.
    			 *
    			 * @since 10.6.0
    			 */
    			do_action( 'internal_woocommerce_cart_item_added_from_user_request', $product_id, $quantity );
    		}
    
    		$response = rest_ensure_response( $this->schema->get_item_response( $this->cart_controller->get_cart_for_response() ) );
    		$response->set_status( 201 );
    		return $response;
    	}