PHP 8.2.31
Preview: GetRuleProcessor.php Size: 1.97 KB
/home/nshryvcy/himaltourism.com/wp-content/plugins/woocommerce/src/Admin/RemoteInboxNotifications/GetRuleProcessor.php

<?php
/**
 * Gets the processor for the specified rule type.
 */

namespace Automattic\WooCommerce\Admin\RemoteInboxNotifications;

defined( 'ABSPATH' ) || exit;

/**
 * Class encapsulating getting the processor for a given rule type.
 */
class GetRuleProcessor {
	/**
	 * Get the processor for the specified rule type.
	 *
	 * @param string $rule_type The rule type.
	 *
	 * @return RuleProcessorInterface The matching processor for the specified rule type, or a FailRuleProcessor if no matching processor is found.
	 */
	public static function get_processor( $rule_type ) {
		switch ( $rule_type ) {
			case 'plugins_activated':
				return new PluginsActivatedRuleProcessor();
			case 'publish_after_time':
				return new PublishAfterTimeRuleProcessor();
			case 'publish_before_time':
				return new PublishBeforeTimeRuleProcessor();
			case 'not':
				return new NotRuleProcessor();
			case 'or':
				return new OrRuleProcessor();
			case 'fail':
				return new FailRuleProcessor();
			case 'pass':
				return new PassRuleProcessor();
			case 'plugin_version':
				return new PluginVersionRuleProcessor();
			case 'stored_state':
				return new StoredStateRuleProcessor();
			case 'order_count':
				return new OrderCountRuleProcessor();
			case 'wcadmin_active_for':
				return new WCAdminActiveForRuleProcessor();
			case 'product_count':
				return new ProductCountRuleProcessor();
			case 'onboarding_profile':
				return new OnboardingProfileRuleProcessor();
			case 'is_ecommerce':
				return new IsEcommerceRuleProcessor();
			case 'base_location_country':
				return new BaseLocationCountryRuleProcessor();
			case 'base_location_state':
				return new BaseLocationStateRuleProcessor();
			case 'note_status':
				return new NoteStatusRuleProcessor();
			case 'option':
				return new OptionRuleProcessor();
			case 'wca_updated':
				return new WooCommerceAdminUpdatedRuleProcessor();
			case 'total_payments_value':
				return new TotalPaymentsVolumeProcessor();
		}

		return new FailRuleProcessor();
	}
}

Directory Contents

Dirs: 1 × Files: 34

Name Size Perms Modified Actions
- drwxr-xr-x 2026-03-03 06:10:19
Edit Download
1.58 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.17 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.13 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
5.20 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.52 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.73 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
689 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.97 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.11 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.29 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.21 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.38 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
2.22 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.22 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
703 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.39 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
775 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.48 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.75 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.48 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.26 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.26 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
6.13 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
2.21 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
657 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
4.60 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.22 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
3.63 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.76 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
788 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.98 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
503 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download
1.60 KB lrw-r--r-- 2026-03-03 06:10:19
Edit Download
881 B lrw-r--r-- 2026-03-03 06:10:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).