Automattic\WooCommerce\Internal\StockNotifications\Frontend

MyAccountEndpoint::is_cancellable │ public static │ WC 1.0

Check whether a notification can still be cancelled by the customer.

Метод класса: MyAccountEndpoint{}

Хуков нет.

Возвращает

bool. True when the notification is in a cancellable status.

Использование

$result = MyAccountEndpoint::is_cancellable( $notification ): bool;
$notification(Notification) (обязательный)
The notification to check.

Код MyAccountEndpoint::is_cancellable() WC 11.2.2

public static function is_cancellable( Notification $notification ): bool {
	return in_array( (string) $notification->get_status(), self::get_cancellable_statuses(), true );
}