WC_Data_Store::__call
Data stores can define additional functions (for example, coupons have some helper methods for increasing or decreasing usage). This passes through to the instance if that function exists.
Method of the class: WC_Data_Store{}
No Hooks.
Returns
Mixed.
Usage
$WC_Data_Store = new WC_Data_Store(); $WC_Data_Store->__call( $method, $parameters );
- $method(string) (required)
- Method.
- $parameters(mixed) (required)
- Parameters.
Changelog
| Since 3.0.0 | Introduced. |
WC_Data_Store::__call() WC Data Store:: call code WC 10.8.1
public function __call( $method, $parameters ) {
if ( is_callable( array( $this->instance, $method ) ) ) {
$object = array_shift( $parameters );
$parameters = array_merge( array( &$object ), $parameters );
return $this->instance->$method( ...$parameters );
}
}