WC_Tracks_Event::__construct()publicWC 1.0

WC_Tracks_Event constructor.

Method of the class: WC_Tracks_Event{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Tracks_Event = new WC_Tracks_Event();
$WC_Tracks_Event->__construct( $event );
$event(array) (required)
Event properties.

WC_Tracks_Event::__construct() code WC 8.9.0

public function __construct( $event ) {
	$_event = self::validate_and_sanitize( $event );
	if ( is_wp_error( $_event ) ) {
		$this->error = $_event;
		return;
	}

	foreach ( $_event as $key => $value ) {
		$this->{$key} = $value;
	}
}