Setting Up Rules to Show/Hide Payment Methods
To set up a new Invoice Payment rule in WooCommerce, follow these steps:
Access Invoice Payment Rules:
Go to your WordPress dashboard.
Navigate to WooCommerce > Invoice Payment.
Add a New Rule:
Click on “Add New” to create a new rule.
Provide Rule Information:
In the “Add New Rule” section, provide the following information:
Add Title: Enter a unique title for the new rule.
Countries, States, Zip Codes, and Cities for Invoice:
Select Countries: Choose the countries for which this rule should apply. Leave it empty for all countries.
Select States: Select specific states where this rule should be active. Leave it empty for all states.
Select Cities: Choose specific cities for the rule. Leave it empty for all cities. Insert all cities separated by commas.
Select Zip Codes: Select specific zip codes or ranges of zip codes. Leave it empty for all zip codes. For ranges, use a hyphen (-) notation (e.g., 45000-46000).
Cart Amount and Products for Invoice:
Cart Amount Range: Set an upper and lower cart range. The payment invoice method will show/hide based on the cart subtotal.
Cart Quantity Range: Set an upper and lower cart quantity. The payment invoice method will show/hide based on the number of items in the cart.
Enable Invoice for Products, Categories & Tags:
All Products: Enable the invoice when all selected products are in the cart, and no other products are present.
At Least One Product: Enable the invoice when at least one of the selected products is in the cart. Other products can be in the cart as well.
Choose Products: Enable the invoice when specific products are in the cart.
Choose Categories: Enable the invoice when the cart contains products from specific categories.
Choose Tags: Enable the invoice when the cart contains products with specific tags.
Enable Invoice For Virtual Product: Use this option to enable the invoice for virtual products. At least one virtual product should be in the cart.
Users and Roles for Invoice:
Enable Invoice for Customers: Search and select customers for whom this rule should apply. Leave empty for all customers.
Enable Invoice for User Roles: Select specific user roles for which this rule should be active. Leave empty for all user roles.
Invoice Based on Shipping:
Select Shipping Methods: Show the invoice based on specific shipping methods. Leave it empty for all methods. Options include:
- Flat Rate
- Free Shipping
- Local Pickup
Save the Rule:
After providing all the necessary information for your rule, be sure to save your settings.
With these settings in place, the Invoice Payment rule will be applied based on the criteria you’ve defined, making it easier to control when and how the payment method is displayed to your customers during checkout.