<?php

namespace Dolphy\Plugin\Helpers;

use Dolphy\Plugin\Option\Payment\Flutterwave;
use Dolphy\Plugin\Option\Payment\Paystack;
use WC_Payment_Gateway;

class WooCommerce {

  public static function isActive() {
    return Plugin::isActive('woocommerce/woocommerce.php');
  }

  public static function isPaymentGatewayActive() {
    return self::isActive() && class_exists(WC_Payment_Gateway::class);
  }

  public static function isPaystackEnabled() {
    $paystack = Paystack::instance();
    return !!$paystack->addToWoocommerce;
  }

  public static function isFlutterwaveEnabled() {
    $flutterwave = Flutterwave::instance();
    return !!$flutterwave->addToWoocommerce;
  }

}
