WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcaginesisstore/new/wp-content/plugins/woo-discount-rules-pro/App/Models/Rules.php
<?php
namespace WDRPro\App\Models;
if (!defined('ABSPATH')) {
    exit;
}
use Wdr\App\Helpers\Rule;
use Wdr\App\Models\DBTable;

if (!defined('ABSPATH')) exit;

class Rules extends Rule
{
   /**
     * Initialize
     * */
    public static function init()
    {
        self::hooks();
    }

    /**
     * Add hooks
     * */
    protected static function hooks(){
        $current_object = new self();
        //add_action('advanced_woo_discount_rules_after_save_rule', array($current_object, 'saveAdditionalRules'), 10, 3);
    }

    /**
     * Save additional rules
     */
    public function saveAdditionalRules($rule_id, $post, $arg)
    {
        $bxgy_cheapest_in_cart_adjustments = $this->getFromArray($post, 'bxgy_cheapest_in_cart_adjustments', array());
        $bxgy_cheapest_from_products_adjustments = $this->getFromArray($post, 'bxgy_cheapest_from_products_adjustments', array());
        $bxgy_cheapest_from_categories_adjustments = $this->getFromArray($post, 'bxgy_cheapest_from_categories_adjustments', array());
        $arg = array(
            'bxgy_cheapest_in_cart_adjustments' => json_encode($bxgy_cheapest_in_cart_adjustments),
            'bxgy_cheapest_from_products_adjustments' => json_encode($bxgy_cheapest_from_products_adjustments),
            'bxgy_cheapest_from_categories_adjustments' => json_encode($bxgy_cheapest_from_categories_adjustments),
        );
        $column_format = array('%s', '%s', '%s');
        $rule_id = DBTable::saveRule($column_format, $arg, $rule_id);
    }
}
Rules::init();