WordPress at Your Fingertips
function is not described

WC_Tracks_Event::__construct() public WC 1.0

WC_Tracks_Event constructor.

{} It's a method of the class: WC_Tracks_Event{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Tracks_Event::__construct() WC 5.8.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;
	}
}