Skip to main content

Creating Custom Icons for WooCommerce Payment Gateways

If you’re looking to enhance the user experience of your Woo Commerce online store, custom payment gateway icons can make a significant difference.
These icons provide visual to customers about the payment methods you accept, thereby increasing trust and convenience during the checkout process.

Here’s a guide on how to add custom icons to payment gateways at checkout page.

1: Prepare Your Icon Images

Before you start implementing custom icons, you’ll need appropriately sized and formatted images. Icons should be in PNG or SVG format for the best quality and should ideally have a transparent background. Common icon dimensions are around 40×40 pixels, but you can adjust this based on your website’s design.

2: Uploading Icons to Your WordPress Media Library

Log in to your wp admin dashboard.
Navigate to “Media” > “Add New.”
Upload your custom payment gateway icons. Make sure to add relevant titles and alt text for accessibility.

3: Locate Payment Gateway IDs

In your WordPress admin dashboard, go to “WooCommerce” > “Settings” > Tab “Payment”

Here, you will see a list of available payment gateways.
Inspect the payment gateways you want to customize, and note down their respective IDs.
You can usually find the ID as a part of the gateway’s settings URL.

4: Adding Custom CSS

In the WordPress admin dashboard, go to “Appearance” > “Customize.”

Open the “Additional CSS” section.

Use the following code template to add a custom icon for a specific payment gateway.
Replace “gateway-id” with the actual ID of your target payment gateway and “icon-url” with the URL of the uploaded icon image.

/* Replace "gateway-id" with your payment gateway's ID */ .woocommerce-checkout-payment .payment_method_gateway-id .payment_box:before { content: ''; display: inline-block; background-image: url('icon-url'); background-size: contain; width: 40px; /* Adjust based on your icon dimensions */ height: 40px; /* Adjust based on your icon dimensions */ margin-right: 10px; /* Adjust spacing as needed */ }

5: Publish and Test

After adding the style, make sure to click the “Publish” button in the WordPress Customizer.
Then, proceed to test the checkout process on your website to ensure that the custom icons are displaying correctly for the chosen payment gateways.

 

Customizing payment gateway icons in WooCommerce can greatly enhance the aesthetic appeal and user-friendliness of your online store.
By following these steps, you can effectively integrate custom icons image and provide a nice checkout experience for your customers.
Always remember to keep your website’s design principles in mind while making these visual modifications.

Close Menu

Web Design Services | SEO & PPC Services | Creative Brand Design | Mobile Apps

About HaimiDigital

49 Bortalav
Balvatika
Bhavnagar
364003
IN

E: hello@haimidigital.com