PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.14
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.14
1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 1.3.45 All 177 releases
disco / app / Intents / IntentFactory.php

IntentFactory.php in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.14, at app/Intents/IntentFactory.php

42 lines 922 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Disco Class File.
4 *
5 * @package Disco
6 * @subpackage Disco\App\Attributes
7 * @category MyCategory
8 */
9
10 namespace Disco\App\Intents;
11
12 /**
13 * Class IntentFactory
14 *
15 * @package Disco
16 * @subpackage Disco\App\Intents
17 * @author Ohidul Islam <wahid0003@gmail.com>
18 * @link https://webappick.com
19 * @license https://opensource.org/licenses/gpl-license.php GNU Public License
20 * @category MyCategory
21 */
22 class IntentFactory {
23
24 /**
25 * This method will return the intent object
26 *
27 * @param \Disco\App\Utility\Config $campaign Campaign Config.
28 * @param array|string|\WP_Error $settings Global Settings.
29 * @return bool|object
30 */
31 public static function get_intent( $campaign, $settings ) {
32 $class = '\Disco\App\Intents\\' . $campaign->get_discount_intent() . 'Intent';
33
34 if ( ! class_exists( $class ) ) {
35 return false;
36 }
37
38 return new $class( $campaign, $settings );
39 }
40
41 }
42