get_sku()); } public static function isEnabledForCartSKUs() { if (WC()->cart) { foreach (WC()->cart->get_cart_contents() as $item) { if (static::isDisabledForSku($item['data']->get_sku())) return false; } } return true; } public static function isDisabledForSKU($sku) { $disabled_skus = array_map( function ($item) {return trim($item);}, array_filter(explode("\n", get_option('tabby_checkout_disable_for_sku', ''))) ); return in_array($sku, $disabled_skus); } public static function getPromoMerchantCode() { $currency = self::getTabbyCurrency(); $merchantCode = self::ALLOWED_COUNTRIES[0]; if (($index = array_search($currency, self::ALLOWED_CURRENCIES)) !== false) { $merchantCode = self::ALLOWED_COUNTRIES[$index]; } return $merchantCode; } }