LLMS_Analytics_Coupons_Widget::set_query()

Setup the query


Return Return

(void)


Top ↑

Source Source

File: includes/admin/reporting/widgets/class.llms.analytics.widget.coupons.php

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
public function set_query() {
 
    global $wpdb;
 
    $this->set_order_data_query(
        array(
            'query_function' => 'get_results',
            'select'         => array(
                'orders.post_date AS date',
            ),
            'joins'          => array(
                "JOIN {$wpdb->postmeta} AS coupons ON orders.ID = coupons.post_id",
            ),
            'statuses'       => array(
                'llms-active',
                'llms-completed',
            ),
            'wheres'         => array(
                " AND coupons.meta_key = '_llms_coupon_used'",
                " AND coupons.meta_value = 'yes'",
            ),
        )
    );
 
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.