Automattic\WooCommerce\Internal\StockNotifications

Notification::set_statuspublicWC 1.0

Set the status.

Method of the class: Notification{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Notification = new Notification();
$Notification->set_status( $status );
$status(string) (required)
Status.

Notification::set_status() code WC 10.3.6

public function set_status( string $status ) {

	if ( ! in_array( $status, NotificationStatus::get_valid_statuses(), true ) ) {
		// Default to pending.
		$status = NotificationStatus::PENDING;
	}

	$this->set_prop( 'status', $status );
}