Automattic\WooCommerce\Internal\StockNotifications\Frontend
MyAccountEndpoint::is_cancellable
Check whether a notification can still be cancelled by the customer.
Method of the class: MyAccountEndpoint{}
No Hooks.
Returns
bool. True when the notification is in a cancellable status.
Usage
$result = MyAccountEndpoint::is_cancellable( $notification ): bool;
- $notification(Notification) (required)
- The notification to check.
MyAccountEndpoint::is_cancellable() MyAccountEndpoint::is cancellable code WC 11.2.1
public static function is_cancellable( Notification $notification ): bool {
return in_array( (string) $notification->get_status(), self::get_cancellable_statuses(), true );
}