Skip to content

Commit

Permalink
Added recurring
Browse files Browse the repository at this point in the history
  • Loading branch information
cecabank committed Feb 23, 2022
1 parent c61ebf6 commit 0a73c6c
Show file tree
Hide file tree
Showing 3 changed files with 465 additions and 9 deletions.
16 changes: 8 additions & 8 deletions give_gateway_cecabank.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function __construct() {
add_action('plugins_loaded', array($this, 'init'));
add_filter('query_vars', array($this, 'query_vars'), 10, 1);
add_action('parse_request', array($this, 'parse_request'), 10, 1);
// add_filter( 'give_recurring_available_gateways', [ $this, 'add_cecabank_recurring_support' ], 99 );
add_filter( 'give_recurring_available_gateways', [ $this, 'add_cecabank_recurring_support' ], 99 );

}

Expand All @@ -107,11 +107,11 @@ public function init() {
* Add recurring support for cecabank.
*
*/
// public function add_cecabank_recurring_support( $gateways ) {
// $gateways['cecabank'] = 'Cecabank_Recurring';
//
// return $gateways;
// }
public function add_cecabank_recurring_support( $gateways ) {
$gateways['cecabank'] = 'Cecabank_Recurring';

return $gateways;
}

public function query_vars($vars){
$vars[] = 'cecabank-payment-pg';
Expand Down Expand Up @@ -241,8 +241,8 @@ private function includes() {

// Load the file only when recurring donations addo-on is enabled.
if ( defined( 'GIVE_RECURRING_VERSION' ) ) {
// include GIVE_RECURRING_PLUGIN_DIR . '/includes/gateways/give-recurring-gateway.php';
// include GIVE_CECABANK_PLUGIN_DIR . '/includes/class_cecabank_recurring.php';
include GIVE_RECURRING_PLUGIN_DIR . '/includes/gateways/give-recurring-gateway.php';
include GIVE_CECABANK_PLUGIN_DIR . '/includes/class_cecabank_recurring.php';
}
}

Expand Down
Loading

0 comments on commit 0a73c6c

Please sign in to comment.