From 233fe4f89fdc55d67fd0428cf59de57fab75794d Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Mon, 7 Oct 2024 11:59:55 +0600 Subject: [PATCH] fix: integrations not loading properly --- includes/Integrations.php | 37 +++++++++++++++++++++++++++++++++++++ wpuf.php | 1 + 2 files changed, 38 insertions(+) create mode 100644 includes/Integrations.php diff --git a/includes/Integrations.php b/includes/Integrations.php new file mode 100644 index 000000000..12205b521 --- /dev/null +++ b/includes/Integrations.php @@ -0,0 +1,37 @@ +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(); + } + } +} diff --git a/wpuf.php b/wpuf.php index 592c40fa6..085823329 100644 --- a/wpuf.php +++ b/wpuf.php @@ -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();