Skip to content

Commit

Permalink
Merge pull request #765 from ebanx/upkeep/fix-wc-missing-error
Browse files Browse the repository at this point in the history
fix fatal error when merchant didn't have Woocommerce plugin active
  • Loading branch information
Vitor da Costa Mamede Corrêa authored Apr 12, 2019
2 parents 20ac021 + 727bdd6 commit fb22bb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gateways/class-wc-ebanx-global-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
}

if ( ! defined( 'IS_TEST' ) ) {
$active_plugins = get_option( 'active_plugins' );
if ( ! in_array( 'woocommerce/woocommerce.php', $active_plugins ) ) {
wp_die( 'Sorry, but this plugin requires the Woocommerce plugin to be installed and active.', null, array( 'back_link' => true ) );
}
require_once WC_EBANX_SERVICES_DIR . 'class-wc-ebanx-notice.php';
require_once WC_EBANX_SERVICES_DIR . 'class-wc-ebanx-constants.php';
require_once WC_EBANX_SERVICES_DIR . 'class-wc-ebanx-helper.php';
Expand Down

0 comments on commit fb22bb8

Please sign in to comment.