Website : phonehp.ir
backdoor
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Home
Console
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
nehpir
/
public_html
/
wp-content
/
plugins
/
woocommersa
/
includes
/
Repositories
/
Filename :
PricingRepository.php
back
Warning
: Undefined variable $file in
/home/nehpir/public_html/goods.php
on line
545
Copy
<?php namespace WooCommersa\Repositories; if (!defined('ABSPATH')) exit; class PricingRepository { private $table; public function __construct() { global $wpdb; $this->table = $wpdb->prefix . 'woocommersa_pricing_rules'; } public function get_all() { global $wpdb; $results = $wpdb->get_results("SELECT * FROM {$this->table}"); foreach ($results as &$row) { $row->conditions = json_decode($row->conditions); } return $results; } public function get_active() { global $wpdb; return $wpdb->get_results("SELECT * FROM {$this->table} WHERE status = 'active'"); } public function save($data) { global $wpdb; $id = $data['id'] ?? 0; unset($data['id']); if ($id) { return $wpdb->update($this->table, $data, ['id' => $id]); } else { return $wpdb->insert($this->table, $data); } } public function delete($id) { global $wpdb; return $wpdb->delete($this->table, ['id' => $id]); } public function update_status($id, $status) { global $wpdb; return $wpdb->update($this->table, ['status' => $status], ['id' => $id]); } }