WC_Data_Store::__call( string $method, mixed $parameters )
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.
Description Description
Parameters Parameters
- $method
-
(Required) Method.
- $parameters
-
(Required) Parameters.
Return Return
(mixed)
Source Source
File: includes/class-wc-data-store.php
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 ); } }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |