Automattic\WooCommerce\Internal\StockNotifications\AsyncTasks

CycleStateService::get_raw_cycle_stateprivateWC 1.0

Get the raw cycle state.

Method of the class: CycleStateService{}

No Hooks.

Returns

Array.

Usage

// private - for code of main (parent) class only
$result = $this->get_raw_cycle_state( $product_id ): array;
$product_id(int) (required)
The product ID.

CycleStateService::get_raw_cycle_state() code WC 10.3.6

private function get_raw_cycle_state( int $product_id ): array {
	$cycle_state = get_option( $this->get_option_name( $product_id ), false );
	if ( ! is_array( $cycle_state ) ) {
		return array();
	}

	return $cycle_state;
}