_country ) { return [ Currency_Code::DANISH_KRONE ]; } if ( Country_Code::HONG_KONG === $account_country ) { return [ Currency_Code::HONG_KONG_DOLLAR ]; } if ( Country_Code::JAPAN === $account_country ) { return [ Currency_Code::JAPANESE_YEN ]; } if ( Country_Code::NORWAY === $account_country ) { return [ Currency_Code::NORWEGIAN_KRONE ]; } if ( Country_Code::SINGAPORE === $account_country ) { return [ Currency_Code::SINGAPORE_DOLLAR ]; } if ( Country_Code::SWEDEN === $account_country ) { return [ Currency_Code::SWEDISH_KRONA ]; } if ( Country_Code::SWITZERLAND === $account_country ) { return [ Currency_Code::SWISS_FRANC ]; } if ( Country_Code::UNITED_KINGDOM === $account_country ) { return [ Currency_Code::POUND_STERLING ]; } if ( Country_Code::UNITED_STATES === $account_country ) { return [ Currency_Code::UNITED_STATES_DOLLAR ]; } return [ 'NONE_SUPPORTED' ]; } /** * Get the list of supported countries * * @return string[] Array of country codes */ public static function get_supported_countries(): array { return [ Country_Code::UNITED_STATES, Country_Code::AUSTRALIA, Country_Code::CANADA, Country_Code::AUSTRIA, Country_Code::BELGIUM, Country_Code::DENMARK, Country_Code::FINLAND, Country_Code::FRANCE, Country_Code::GERMANY, Country_Code::IRELAND, Country_Code::ITALY, Country_Code::LUXEMBOURG, Country_Code::NETHERLANDS, Country_Code::NORWAY, Country_Code::PORTUGAL, Country_Code::SPAIN, Country_Code::SWEDEN, Country_Code::SWITZERLAND, Country_Code::UNITED_KINGDOM, Country_Code::HONG_KONG, Country_Code::JAPAN, Country_Code::SINGAPORE, ]; } /** * Get the payment method capabilities * * @return string[] */ public static function get_capabilities(): array { return [ PaymentMethodCapability::REFUNDS, PaymentMethodCapability::MULTI_CURRENCY, ]; } /** * Get the URL for the payment method's icon * * @param string|null $account_country Optional. The merchant's account country. * * @return string */ public static function get_icon_url( ?string $account_country = null ): string { return plugins_url( 'assets/images/payment-methods/wechat-pay.svg', WCPAY_PLUGIN_FILE ); } /** * Get the URL for the payment method's dark mode icon * * @param string|null $account_country Optional. The merchant's account country. * * @return string Returns regular icon URL if no dark mode icon exists */ public static function get_dark_icon_url( ?string $account_country = null ): string { return self::get_icon_url( $account_country ); } /** * Get the URL for the payment method's settings icon * * @param string|null $account_country Optional. The merchant's account country. * * @return string */ public static function get_settings_icon_url( ?string $account_country = null ): string { return self::get_icon_url( $account_country ); } /** * Get the testing instructions for the payment method * * @param string $account_country The merchant's account country. * @return string HTML string containing testing instructions */ public static function get_testing_instructions( string $account_country ): string { return ''; } /** * Get the currency limits for the payment method * * @return array> */ public static function get_limits_per_currency(): array { return []; } /** * Whether this payment method is available for the given currency and country * * @param string $currency The currency code to check. * @param string $account_country The merchant's account country. * * @return bool */ public static function is_available_for( string $currency, string $account_country ): bool { if ( ! PaymentMethodUtils::is_available_for( self::get_supported_currencies(), self::get_supported_countries(), $currency, $account_country ) ) { return false; } return true; } /** * Whether this payment method should be enabled by default * * @return bool */ public static function is_enabled_by_default(): bool { return false; } /** * Get the minimum amount for this payment method for a given currency and country * * @param string $currency The currency code. * @param string $country The country code. * * @return int|null The minimum amount or null if no minimum. */ public static function get_minimum_amount( string $currency, string $country ): ?int { return null; } /** * Get the maximum amount for this payment method for a given currency and country * * @param string $currency The currency code. * @param string $country The country code. * * @return int|null The maximum amount or null if no maximum. */ public static function get_maximum_amount( string $currency, string $country ): ?int { return null; } }
Fatal error: Uncaught InvalidArgumentException: Payment method definition class "WCPay\PaymentMethods\Configs\Definitions\WechatPayDefinition" does not exist. in /home/sanattv/public_html/sanat.tv/wp-content/plugins/woocommerce-payments/includes/payment-methods/Configs/Registry/PaymentMethodDefinitionRegistry.php:90 Stack trace: #0 /home/sanattv/public_html/sanat.tv/wp-content/plugins/woocommerce-payments/includes/payment-methods/Configs/Registry/PaymentMethodDefinitionRegistry.php(68): WCPay\PaymentMethods\Configs\Registry\PaymentMethodDefinitionRegistry->register_payment_method('WCPay\\PaymentMe...') #1 /home/sanattv/public_html/sanat.tv/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php(611): WCPay\PaymentMethods\Configs\Registry\PaymentMethodDefinitionRegistry->init() #2 /home/sanattv/public_html/sanat.tv/wp-content/plugins/woocommerce-payments/woocommerce-payments.php(165): WC_Payments::init() #3 /home/sanattv/public_html/sanat.tv/wp-includes/class-wp-hook.php(324): wcpay_init('') #4 /home/sanattv/public_html/sanat.tv/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /home/sanattv/public_html/sanat.tv/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /home/sanattv/public_html/sanat.tv/wp-settings.php(578): do_action('plugins_loaded') #7 /home/sanattv/public_html/sanat.tv/wp-config.php(102): require_once('/home/sanattv/p...') #8 /home/sanattv/public_html/sanat.tv/wp-load.php(50): require_once('/home/sanattv/p...') #9 /home/sanattv/public_html/sanat.tv/wp-blog-header.php(13): require_once('/home/sanattv/p...') #10 /home/sanattv/public_html/sanat.tv/index.php(17): require('/home/sanattv/p...') #11 {main} thrown in /home/sanattv/public_html/sanat.tv/wp-content/plugins/woocommerce-payments/includes/payment-methods/Configs/Registry/PaymentMethodDefinitionRegistry.php on line 90