# blocks/trunk/src/Settings/Requirement.php

Blocks – Reusable Content, Shortcodes &amp; Site Variables, version trunk. 22 lines.

- Page: https://pluginprobe.com/plugins/blocks/trunk/code/src/Settings/Requirement.php
- Raw: https://pluginprobe.com/plugins/blocks/trunk/raw/src/Settings/Requirement.php
- Modified: 2026-07-13T20:34:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/blocks/trunk/code/src/Settings/Requirement.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace RenzoJohnson\Blocks\Settings;

\defined( 'ABSPATH' ) || exit;

enum Requirement {
	case Always;
	case WooCommerce;
	case WooCommerceSubscriptions;

	public function satisfied(): bool {
		return match ( $this ) {
			self::Always => true,
			self::WooCommerce => \class_exists( 'WooCommerce' ),
			self::WooCommerceSubscriptions => \class_exists( 'WooCommerce' ) && \class_exists( 'WC_Subscriptions' ),
		};
	}
}

```
