woocommerce_rest_api_uploaded_image_from_url

woocommerce_rest_api_uploaded_image_from_url

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_rest_api_uploaded_image_from_url') is found 1 times:

  • /includes/wc-rest-functions.php line 121
    		/* translators: %s: error message */
    		return new WP_Error( 'woocommerce_rest_invalid_image', sprintf( __( 'Invalid image: %s', 'woocommerce' ), $file['error'] ), array( 'status' => 400 ) );
    	}
    
    	do_action( 'woocommerce_rest_api_uploaded_image_from_url', $file, $image_url );
    
    	return $file;
    }
    
    /**
     * Set uploaded image as attachment.