The solution to this issue depends on which page you notice that the payment gateway is not displayed. Usually, there are two places where this occurs.
1. On the Checkout page
When a payment gateway is not appearing on the checkout page, it most probably means that it was not enabled for the currency which is being used to complete the order.
Solution
Please go to WordPress Admin area > WooCommerce > Currency Switcher > Payment Gateways and add the payment gateway(s) you would like to enable for each currency. Please note that not all gateways support all currencies. It's up to you to make sure that the gateways you enable will accept the currency.
2. On the Currency Switcher Options page
When a payment gateway is not appearing on the Currency Switcher Options > Payment Gateways page, it's usually due to two possible reasons:
- The payment plugin is disabling itself because it detects that the shop's base currency, or one of the enabled currencies is not amongst the list of the ones it supports.
- The payment plugin is returning its status incorrectly to the Currency Switcher.
- Open the payment gateway plugin main file. It's usually called woocommerce-gateway-<payment gateway name>.php
- Inside the file, search for the code of a currency that it supports. For example, if the plugin supports US Dollars, look for USD. You should then find, somewhere in the code, a list like the following:
['USD', 'CAD', 'EUR', (other currency codes)... ] - Modify the list by adding the currencies you would like to support. For example, if you wish to accept AED, GBP and RUB as well, modify the line as follows:
['AED', 'GBP', 'RUB', 'USD', 'CAD', 'EUR', (other currency codes)... ] - Save the file.
- If the payment gateway could not be enabled before the changes, enabled it now.
- Go back to Currency Switcher Options > Payment Gateways. You should have the payment gateway plugin you just modified amongst the available ones.
/** * Adds extra currencies to the list of the currencies "accepted" by the standard * PayPal gateway included with WooCommerce. This will ensure that the gateway * doesn't disable itself even when another, valid currency, such as EUR or USD, * is selected. * * NOTE * Filter "woocommerce_paypal_supported_currencies" is the one used by the PayPal * Standard gateway included with WooCommerce. If your gateway of choice uses another * filter, simply replace its name below. * * @param array currencies The original list of currencies passed by the PayPal gateway * @return array A list with extra currencies added to it. */ add_filter('woocommerce_paypal_supported_currencies', function($currencies) { // Add your currencies, like in the example below $currencies[] = 'INR'; // Add Indian Rupees $currencies[] = 'PKR'; // Add Pakistani Rupees $currencies[] = 'ZAR'; // Add South African Rand return $currencies; }, 10, 1);
2. How to fix a payment plugin that returns its status incorrectly
Plugin should returns its status as "yes" or "no". However, some plugins return true or false (notably, the PayPal plugin included with WooCommerce does that, violating the documentation and the guidelines contained in it). To fix an incorrect status, you will need to analyse the affected plugin, and make sure that its enabled property always contains either a "yes" or a "no" value. It must be a string, bool or numeric values may not work correctly.