This guide delves into the functionalities of the “Payment Gateways per Product” feature within the Pro version of the “Payment Methods by Product & Country for WooCommerce” plugin. This powerful tool allows you to establish granular control over which payment gateways are available for specific products, categories, or tags, leading to a more optimized checkout experience for your customers.
Key Functionalities:
- Enable/Disable Plugin: Activate or deactivate the “Payment Gateways per Product” functionality based on your needs.
Sections:
The plugin offers three distinct sections for defining payment gateway availability:
- Per Product Categories: Manage payment gateways for product categories within your store.
- Per Product Tags: Control payment options based on the tags assigned to individual products.
- Per Products: Assign specific payment gateways to individual products for the most granular control.
Advanced Options: Fallback Gateway
- Enable Section: Activate the “Fallback Gateway” feature to ensure at least one payment method is always displayed at checkout, even if your defined rules prevent any from showing initially.
- Choose Fallback Gateway: Select a default payment gateway that will appear as a last resort if your configured conditions exclude all other options.
The plugin provides commonly used gateways like Direct Bank Transfer, Check Payments, and Cash on Delivery.
- Add Filter: Define the location where the plugin injects its logic to determine the available payment gateways.
- In a constructor: Injects the logic during plugin initialization.
- On “init” action: Injects the logic when the WordPress “init” action fires (a common point for plugin initialization).
Example: Per Product Categories
This example demonstrates how to configure payment gateways for product categories.
- Enable Section: Activate the “Per Product Categories” section.
Direct Bank Transfer
- Include: Leave blank (default) to include “Direct Bank Transfer” for all categories.
- Exclude: Leave blank (default) to allow “Direct Bank Transfer” for all categories.
Check Payments
- Include: Leave blank to include “Check Payments” for all categories.
- Exclude: Leave blank to allow “Check Payments” for all categories.
Cash on Delivery
- Include: Leave blank to include “Cash on Delivery” for all categories.
- Exclude: Leave blank to allow “Cash on Delivery” for all categories.
In this scenario: All payment gateways (Direct Bank Transfer, Check Payments, and Cash on Delivery) are available for all product categories by default.
Customization Potential
By utilizing the “Include” and “Exclude” options within each section, you can create intricate rules for controlling payment gateway visibility. For instance, you might:
- Offer Cash on Delivery only for specific product categories (e.g., bulky items).
- Restrict Check Payments to high-value products.
- Limit Direct Bank Transfer to a particular product tag (e.g., “downloadable”).
The “Payment Gateways per Product” feature empowers you to create a dynamic checkout experience that caters to the specific requirements of your products and customer base. By strategically assigning payment methods, you can streamline the checkout process, potentially enhance customer satisfaction, and potentially boost sales conversions within your WooCommerce store.