Automattic\WooCommerce\Admin\RemoteInboxNotifications\Transformers
DotNotation::transform()
Find given path from the given value.
Method of the class: DotNotation{}
No Hooks.
Return
Mixed
.
Usage
$DotNotation = new DotNotation(); $DotNotation->transform( $value, $arguments, $default );
- $value(mixed) (required)
- a value to transform.
- $arguments(stdClass|null)
- required argument 'path'.
Default: null - $default(string|null)
- default value.
Default: null
DotNotation::transform() DotNotation::transform code WC 8.7.0
public function transform( $value, stdclass $arguments = null, $default = null ) { if ( is_object( $value ) ) { // if the value is an object, convert it to an array. $value = json_decode( wp_json_encode( $value ), true ); } return $this->get( $value, $arguments->path, $default ); }