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.


Top ↑

Return Return

(mixed) The result from the function.


Top ↑

Source Source

File: includes/class-woocommerce.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.4 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.