| @@ -124,8 +124,9 @@ | ||
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * Setup |
| 127 | 127 | * |
| 128 | + * @since 4.3.0 use init hook for currency and gateway list | |
| 128 | 129 | * @since 2.4.0 |
| 129 | 130 | * @access private |
| 130 | 131 | */ |
| 131 | 132 | private function setup() { |
| @@ -136,10 +137,10 @@ | ||
| 136 | 137 | add_action( 'added_option', [ $this, 'reload_plugin_settings' ] ); |
| 137 | 138 | add_action( 'updated_option', [ $this, 'reload_plugin_settings' ] ); |
| 138 | 139 | add_action( 'deleted_option', [ $this, 'reload_plugin_settings' ] ); |
| 139 | 140 | |
| 140 | - add_action( 'give_init', [ $this, 'setup_currencies_list' ], 11 ); | |
| 141 | - add_action( 'give_init', [ $this, 'setup_gateways_list' ], 11 ); | |
| 141 | + add_action( 'init', [ $this, 'setup_currencies_list' ]); | |
| 142 | + add_action( 'init', [ $this, 'setup_gateways_list' ]); | |
| 142 | 143 | } |
| 143 | 144 | |
| 144 | 145 | /** |
| 145 | 146 | * Load plugin settings |
| @@ -229,23 +230,14 @@ | ||
| 229 | 230 | * Setup gateway list |
| 230 | 231 | * |
| 231 | 232 | * Note: use give_get_enabled_payment_gateways function to get list of registered gateway. |
| 232 | 233 | * |
| 234 | + * @since 3.0.0 test and offline gateways are defaulted in the new Gateway API | |
| 233 | 235 | * @since 2.4.0 |
| 234 | 236 | * @since 2.15.0 Set payment gateway checkout label to admin defined payment gateway checkout label. |
| 235 | 237 | */ |
| 236 | 238 | public function setup_gateways_list() { |
| 237 | - // Default, built-in gateways | |
| 238 | - $gateways = [ | |
| 239 | - 'manual' => [ | |
| 240 | - 'admin_label' => __( 'Test Donation', 'give' ), | |
| 241 | - 'checkout_label' => __( 'Test Donation', 'give' ), | |
| 242 | - ], | |
| 243 | - 'offline' => [ | |
| 244 | - 'admin_label' => esc_attr__( 'Offline Donation', 'give' ), | |
| 245 | - 'checkout_label' => esc_attr__( 'Offline Donation', 'give' ), | |
| 246 | - ], | |
| 247 | - ]; | |
| 239 | + $gateways = []; | |
| 248 | 240 | |
| 249 | 241 | /** |
| 250 | 242 | * Filter the supported gateways list |
| 251 | 243 | * |