Skip to content

Commit

Permalink
Simplified settings class and added listener action.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Nov 19, 2015
1 parent 7446ddd commit 4ea00ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ public function __construct() {
$this->name = 'Buckaroo - HTML';
$this->url = 'https://payment.buckaroo.nl/';
$this->provider = 'buckaroo';

// Actions
$action = array( 'Pronamic_WP_Pay_Gateways_Buckaroo_Listener', 'listen' );

if ( ! has_action( 'wp_loaded', $action ) ) {
add_action( 'wp_loaded', $action );
}
}

public function get_config_factory_class() {
Expand All @@ -17,7 +24,7 @@ public function get_config_class() {
}

public function get_settings_class() {
return 'Pronamic_WP_Pay_Gateways_Buckaroo_GatewaySettings';
return 'Pronamic_WP_Pay_Gateways_Buckaroo_Settings';
}

public function get_gateway_class() {
Expand Down
2 changes: 1 addition & 1 deletion src/GatewaySettings.php → src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @version 1.2.1
* @since 1.2.1
*/
class Pronamic_WP_Pay_Gateways_Buckaroo_GatewaySettings extends Pronamic_WP_Pay_GatewaySettings {
class Pronamic_WP_Pay_Gateways_Buckaroo_Settings extends Pronamic_WP_Pay_GatewaySettings {
public function __construct() {
add_filter( 'pronamic_pay_gateway_sections', array( $this, 'sections' ) );
add_filter( 'pronamic_pay_gateway_fields', array( $this, 'fields' ) );
Expand Down

0 comments on commit 4ea00ff

Please sign in to comment.