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 / Intent.php

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

66 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Intent Class File.
4 *
5 * @package Disco
6 * @subpackage \App\Intents\Intent.php
7 * @since 1.0.0
8 */
9
10 namespace Disco\App\Intents;
11
12 /**
13 * Class Intent
14 *
15 * @package Disco
16 * @subpackage \App\Intent
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 Intention
21 */
22 abstract class Intent {
23
24 use \Disco\App\Intents\IntentHelper;
25
26 /**
27 * @var \Disco\App\Utility\Config $campaign Campaign Config.
28 */
29 public $campaign;
30
31 /**
32 * @var \Disco\App\Utility\Settings|array $settings Global Settings.
33 */
34 protected $settings;
35
36 /**
37 * Apply intention.
38 *
39 * @param array $items Discount Applicable Cart Items.
40 * @param \WC_Cart|\WC_Product $cart Cart or Product Object.
41 * @return mixed
42 */
43 abstract public function get_discounts( $items, $cart );
44
45 /**
46 * Apply intention.
47 *
48 * @param array $items Discount Applicable Cart Items.
49 * @param \WC_Cart|\WC_Product $cart Cart or Product Object.
50 * @return mixed
51 */
52 abstract public function get_offers( $items, $cart );
53
54 /**
55 * Intent constructor.
56 *
57 * @param \Disco\App\Utility\Config $campaign Campaign Config.
58 * @param \Disco\App\Utility\Settings|array $settings Global Settings.
59 */
60 public function __construct( $campaign, $settings ) {
61 $this->campaign = $campaign;
62 $this->settings = $settings;
63 }
64
65 }
66