Skip to content

Commit

Permalink
fix: integrations not loading properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Oct 7, 2024
1 parent 9466787 commit 233fe4f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions includes/Integrations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace WeDevs\Wpuf;

/**
* The installer class
*
* @since 2.6.0
*/
class Integrations {
/**
* Holds various class instances
*
* @since 4.0.9
*
* @var array
*/
public $container = [];

public function __construct() {
if ( class_exists( 'WeDevs_Dokan' ) ) {
$this->container['dokan'] = new Integrations\WPUF_Dokan_Integration();
}

if ( class_exists( 'WC_Vendors' ) ) {
$this->container['wc_vendors'] = new Integrations\WPUF_WC_Vendors_Integration();
}

if ( class_exists( 'WCMp' ) ) {
$this->container['wcmp'] = new Integrations\WPUF_WCMp_Integration();
}

if ( class_exists( 'ACF' ) ) {
$this->container['acf'] = new Integrations\WPUF_ACF_Compatibility();
}
}
}
1 change: 1 addition & 0 deletions wpuf.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public function instantiate() {
$this->container['bank'] = new WeDevs\Wpuf\Lib\Gateway\Bank();
$this->container['paypal'] = new WeDevs\Wpuf\Lib\Gateway\Paypal();
$this->container['api'] = new WeDevs\Wpuf\API();
$this->container['integrations'] = new WeDevs\Wpuf\Integrations();

if ( is_admin() ) {
$this->container['admin'] = new WeDevs\Wpuf\Admin();
Expand Down

0 comments on commit 233fe4f

Please sign in to comment.