public function get_coupons_summary() {
$fields = "id, name, name_slug, descr, image, start_date, end_date, expire";
$table = GLM_MEMBERS_COUPONS_PLUGIN_DB_PREFIX."coupons";
- $where = "status IN (".$this->config['status_numb']['Active'].")";
+ $where = "status IN (".$this->config['status_numb']['Active'].")
+ AND start_date <= CURDATE()
+ AND end_date >= CURDATE()";
$sql = "
SELECT $fields
FROM $table
public function get_packages_summary() {
$fields = "id, title, package_slug, short_descr, image, start_date, end_date, expire_date";
$table = GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX."packages";
- $where = "status IN (".$this->config['status_numb']['Active'].")";
+ $where = "status IN (".$this->config['status_numb']['Active'].")
+ AND start_date <= CURDATE()
+ AND end_date >= CURDATE()";
$sql = "
SELECT $fields
FROM $table