PluginProbe
Tiered Pricing Table for WooCommerce / 2.3.4
Tiered Pricing Table for WooCommerce v2.3.4
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
tier-pricing-table / src / Integrations / Integrations.php

Integrations.php in Tiered Pricing Table for WooCommerce 2.3.4, at src/Integrations/Integrations.php

57 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Integrations;
2
3 use TierPricingTable\Integrations\Plugins\MixMatch;
4 use TierPricingTable\Integrations\Plugins\WooCommerceProductAddons;
5 use TierPricingTable\Integrations\Themes\Avada;
6 use TierPricingTable\Integrations\Themes\Divi;
7 use TierPricingTable\Integrations\Themes\Electro;
8 use TierPricingTable\Integrations\Themes\Flatsome;
9 use TierPricingTable\Integrations\Themes\Merchandiser;
10 use TierPricingTable\Integrations\Themes\Neto;
11 use TierPricingTable\Integrations\Themes\OceanWp;
12 use TierPricingTable\Integrations\Themes\Shopkeeper;
13 use TierPricingTable\Integrations\Themes\TheRetailer;
14
15 class Integrations {
16
17 private $themes = array();
18
19 private $plugins = array();
20
21 public function __construct() {
22 $this->init();
23 add_action( 'init', function () {
24 // dd( wp_get_theme()->name );
25 } );
26 }
27
28 public function init() {
29 $this->themes = apply_filters( 'tier_pricing_table/integrations/themes', array(
30 'Avada' => Avada::class,
31 'Divi' => Divi::class,
32 'OceanWP' => OceanWp::class,
33 'Flatsome' => Flatsome::class,
34 'Shopkeeper' => Shopkeeper::class,
35 'The Retailer' => TheRetailer::class,
36 'Merchandiser' => Merchandiser::class,
37 'Electro' => Electro::class,
38 ) );
39
40 $this->plugins = apply_filters( 'tier_pricing_table/integrations/plugins', array(
41 'MixMatch' => MixMatch::class,
42 'WooCommerceProductAddons' => WooCommerceProductAddons::class
43 ) );
44
45
46 foreach ( $this->themes as $themeName => $theme ) {
47 if ( wp_get_theme()->name === $themeName ) {
48 new $theme();
49 }
50 }
51
52 foreach ( $this->plugins as $pluginName => $plugin ) {
53 new $plugin();
54 }
55 }
56 }
57