Solve WooCommerce Payment Gateways SVG Icons Not Showing
In many payment gateways, WooThemes and SkyVerge decided to use SVG files instead of PNG files to display credit card icons. It’s a great move as SVG files can provide an equal quality on retina and no retina screen for the same file weight.
But from time to time, and depending on the server the install is hosted on when HTTPS is enabled you can experience the following issue: SVG files are listed as missing files (404 error).
Hopefully, there’s a quick workaround for that. There’s usually a filter that tells the plugin to load SVG or PNG files. By default, it’s set to SVG, but you can easily decide to use PNG instead. Let’s have an example with Moneris. Using the following snippet, and placing it in the file called functions.php will tell the Moneris payment gateway to use PNG files:
You can quickly check if the payment gateways that you use provide this filter by searching for _use_svg in the source code. If so, check for the plugin ID and replace gateway_moneris with the ID of your plugin and you’re done!