Create Your custom payment gateway for woocommerce in wordpress
If you want to create your custom payment gateway for some special users , like for some users having a specific role. Then it would be very helpful for you.
I created this for my client's special requirement. I need to create a special payment gateway for users having role Wholesaler (wholesale_customer). So that the Wholesalers can place an order without making a payment , and get a bill in the last of the month.
You can just place the whole code in theme's functions.php , or you can create your custom plugin with this code. If you faces any problem , feel free to contact me.
- Your php version should be greater than 5.5
- wordpress version should be 4.5 or above
- Woocommerce version should be 3.2.0 or above
- You can create your own custom payment gateway
- You can provide this for some specific users
- You can customize it ahead , as your requirement
- If you faces any problem , feel free to contact me.
- place this code in your active theme's functions.php
- You can update the payment gateway details from here https://yourdomain.com/wp-admin/admin.php?page=wc-settings&tab=checkout§ion=pay_on_account_gateway
- When a user places and order using this payment gateway , order status would be "Payment On Account"
Thanks :)
For any further queries you can contact me directly here on my email id: kundansinghsorout@gmail.com