WooCommerce::call_function( string $function_name, mixed $parameters )
Call a user function. This should be used to execute any non-idempotent function, especially those in the includes
directory or provided by WordPress.
Description Description
This method can be useful for unit tests, since functions called using this method can be easily mocked by using WC_Unit_Test_Case::register_legacy_proxy_function_mocks.
Parameters Parameters
- $function_name
-
(Required) The function to execute.
- $parameters
-
(Required) The parameters to pass to the function.
Return Return
(mixed) The result from the function.
Source Source
File: includes/class-woocommerce.php
Changelog Changelog
Version | Description |
---|---|
4.4 | Introduced. |