PluginProbe
Tiered Pricing Table for WooCommerce / 6.5.0
Tiered Pricing Table for WooCommerce v6.5.0
8.0.2 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 All 91 releases
tier-pricing-table / src / Integrations / Plugins / DiscountRulesForWooCommerce.php

DiscountRulesForWooCommerce.php in Tiered Pricing Table for WooCommerce 6.5.0, at src/Integrations/Plugins/DiscountRulesForWooCommerce.php

52 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Integrations\Plugins;
2
3 class DiscountRulesForWooCommerce extends PluginIntegrationAbstract {
4
5 public function run() {
6
7 add_filter( 'tiered_pricing_table/cart/need_price_recalculation', function ( $recalculate, $cartItem ) {
8 if ( isset( $cartItem['wdr_free_product'] ) ) {
9 return false;
10 }
11
12 return $recalculate;
13 }, 10, 2 );
14
15 add_filter( 'tiered_pricing_table/cart/need_price_recalculation/item', function ( $recalculate, $cartItem ) {
16 if ( isset( $cartItem['wdr_free_product'] ) ) {
17 return false;
18 }
19
20 return $recalculate;
21 }, 10, 2 );
22 }
23
24 public function addToIntegrationsSettings( $integrations ) {
25 return $integrations;
26 }
27
28 public function getIconURL(): string {
29 return '';
30 }
31
32 public function getAuthorURL(): string {
33 return 'https://wordpress.org/plugins/woo-discount-rules/';
34 }
35
36 public function getTitle(): string {
37 return __( 'Discount Rules for WooCommerce', 'tier-pricing-table' );
38 }
39
40 public function getDescription(): string {
41 return __( 'Prevent price recalculations for free promotional items added to the cart by Discount Rules for WooCommerce.', 'tier-pricing-table' );
42 }
43
44 public function getSlug(): string {
45 return 'discount-rules-for-woocommerce';
46 }
47
48 public function getIntegrationCategory(): string {
49 return 'other';
50 }
51 }
52