| 1 |
<?php namespace TierPricingTable\Integrations; |
| 2 |
|
| 3 |
use TierPricingTable\Integrations\Plugins\AddifyRequestAQuote; |
| 4 |
use TierPricingTable\Integrations\Plugins\AeliaMulticurrency; |
| 5 |
use TierPricingTable\Integrations\Plugins\Curcy; |
| 6 |
use TierPricingTable\Integrations\Plugins\DiscountRulesForWooCommerce; |
| 7 |
use TierPricingTable\Integrations\Plugins\Elementor\ElementorIntegration; |
| 8 |
use TierPricingTable\Integrations\Plugins\MixMatch; |
| 9 |
use TierPricingTable\Integrations\Plugins\ProductBundles; |
| 10 |
use TierPricingTable\Integrations\Plugins\RankMath\RankMath; |
| 11 |
use TierPricingTable\Integrations\Plugins\SEOPress\SEOPress; |
| 12 |
use TierPricingTable\Integrations\Plugins\U2CodeProductAddons; |
| 13 |
use TierPricingTable\Integrations\Plugins\U2CodeMulticurrency; |
| 14 |
use TierPricingTable\Integrations\Plugins\WCCS; |
| 15 |
use TierPricingTable\Integrations\Plugins\WCPA; |
| 16 |
use TierPricingTable\Integrations\Plugins\WCPProductBundles; |
| 17 |
use TierPricingTable\Integrations\Plugins\WooPaymentsMulticurrency; |
| 18 |
use TierPricingTable\Integrations\Plugins\WombatProductAddons; |
| 19 |
use TierPricingTable\Integrations\Plugins\WooCommerceDeposits; |
| 20 |
use TierPricingTable\Integrations\Plugins\WooCommerceProductAddons; |
| 21 |
use TierPricingTable\Integrations\Plugins\WooCommerceSubscriptions; |
| 22 |
use TierPricingTable\Integrations\Plugins\WOOCS; |
| 23 |
use TierPricingTable\Integrations\Plugins\WPAllImport; |
| 24 |
use TierPricingTable\Integrations\Plugins\WPMLMulticurrency; |
| 25 |
use TierPricingTable\Integrations\Plugins\WPMLMultilingual; |
| 26 |
use TierPricingTable\Integrations\Plugins\YithMulticurrency; |
| 27 |
use TierPricingTable\Integrations\Plugins\YithRequestAQuote; |
| 28 |
use TierPricingTable\Integrations\Plugins\Yoast\Yoast; |
| 29 |
use TierPricingTable\Integrations\Themes\Astra; |
| 30 |
use TierPricingTable\Integrations\Themes\Avada; |
| 31 |
use TierPricingTable\Integrations\Themes\Divi; |
| 32 |
use TierPricingTable\Integrations\Themes\Flatsome; |
| 33 |
use TierPricingTable\Integrations\Themes\Merchandiser; |
| 34 |
use TierPricingTable\Integrations\Themes\OceanWp; |
| 35 |
use TierPricingTable\Integrations\Themes\Shopkeeper; |
| 36 |
use TierPricingTable\Integrations\Themes\TheRetailer; |
| 37 |
use TierPricingTable\Integrations\Themes\Zakra; |
| 38 |
|
| 39 |
class Integrations { |
| 40 |
|
| 41 |
public function __construct() { |
| 42 |
$this->init(); |
| 43 |
} |
| 44 |
|
| 45 |
public function init() { |
| 46 |
$themes = apply_filters( 'tiered_pricing_table/integrations/themes', array( |
| 47 |
'avada' => Avada::class, |
| 48 |
'astra' => Astra::class, |
| 49 |
'divi' => Divi::class, |
| 50 |
'oceanWP' => OceanWp::class, |
| 51 |
'flatsome' => Flatsome::class, |
| 52 |
'shopkeeper' => Shopkeeper::class, |
| 53 |
'the retailer' => TheRetailer::class, |
| 54 |
'merchandiser' => Merchandiser::class, |
| 55 |
'zakra' => Zakra::class, |
| 56 |
) ); |
| 57 |
|
| 58 |
$plugins = apply_filters( 'tiered_pricing_table/integrations/plugins', array( |
| 59 |
ElementorIntegration::class, |
| 60 |
WPAllImport::class, |
| 61 |
U2CodeProductAddons::class, |
| 62 |
U2CodeMulticurrency::class, |
| 63 |
WooCommerceProductAddons::class, |
| 64 |
WooCommerceSubscriptions::class, |
| 65 |
ProductBundles::class, |
| 66 |
WooCommerceDeposits::class, |
| 67 |
WOOCS::class, |
| 68 |
WCPA::class, |
| 69 |
AeliaMulticurrency::class, |
| 70 |
MixMatch::class, |
| 71 |
|
| 72 |
WCCS::class, |
| 73 |
WPMLMulticurrency::class, |
| 74 |
WPMLMultilingual::class, |
| 75 |
WooPaymentsMulticurrency::class, |
| 76 |
YithMulticurrency::class, |
| 77 |
YithRequestAQuote::class, |
| 78 |
AddifyRequestAQuote::class, |
| 79 |
|
| 80 |
WombatProductAddons::class, |
| 81 |
|
| 82 |
DiscountRulesForWooCommerce::class, |
| 83 |
Curcy::class, |
| 84 |
|
| 85 |
WCPProductBundles::class, |
| 86 |
|
| 87 |
Yoast::class, |
| 88 |
RankMath::class, |
| 89 |
SEOPress::class, |
| 90 |
) ); |
| 91 |
|
| 92 |
foreach ( $themes as $themeName => $theme ) { |
| 93 |
if ( strpos( strtolower( wp_get_theme()->name ), |
| 94 |
$themeName ) !== false || ( ! empty( wp_get_theme()->template ) && strpos( strtolower( wp_get_theme()->template ), |
| 95 |
$themeName ) !== false ) ) { |
| 96 |
new $theme(); |
| 97 |
} |
| 98 |
} |
| 99 |
|
| 100 |
foreach ( $plugins as $plugin ) { |
| 101 |
new $plugin(); |
| 102 |
} |
| 103 |
} |
| 104 |
} |
| 105 |
|