-
Notifications
You must be signed in to change notification settings - Fork 0
Technical docs
Hasan Hasanzade edited this page Aug 21, 2024
·
6 revisions
- Add payment method main class file in
includes/payment-gateways
. Follow the class structure and naming (Ctrl+C
&Ctrl+V
😉) from other async payment methods (i.e. Credit Card). Shortcode, name, description should be defined in this file. - Include that file in the
init()
method of plugin base class file -bp-plugin-woocommerce-api2.php
. Then add it to$methods
array inadd_betterpayment_gateways()
. - Generate, translate and compile strings (name & description). Run the following command to generate .pot file. Make sure wp-cli is intalled and configured beforehand.
wp i18n make-pot . languages/bp-plugin-woocommerce-api2.pot
As a result new strings should be added to .pot file. Using Poedit load existing language's .po file from .pot file, then add translations. It should automatically compile into .mo file.
I guess that's it :)
Support: [email protected]