| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
|
| 5 |
add_action( 'plugins_loaded', function () { |
| 6 |
if ( ! get_option( WC_Vipps_Recurring_Helper::OPTION_CONFIGURED, false ) ) { |
| 7 |
return; |
| 8 |
} |
| 9 |
|
| 10 |
require_once __DIR__ . '/compat/wc-vipps-recurring-all-products-support.php'; |
| 11 |
WC_Vipps_Recurring_All_Products_Support::init(); |
| 12 |
|
| 13 |
if ( defined( 'KCO_WC_VERSION' ) |
| 14 |
&& class_exists( 'KCO' ) |
| 15 |
&& version_compare( KCO_WC_VERSION, '2.0.0', '>=' ) |
| 16 |
&& ! has_filter( 'kco_wc_api_request_args', [ |
| 17 |
WC_Vipps_Recurring_Kc_Support::class, |
| 18 |
'kcoepm_create_vipps_recurring_order' |
| 19 |
] ) ) { |
| 20 |
|
| 21 |
require_once __DIR__ . '/compat/wc-vipps-recurring-kc-support.php'; |
| 22 |
WC_Vipps_Recurring_Kc_Support::init(); |
| 23 |
} |
| 24 |
} ); |
| 25 |
|
| 26 |
|