LLMS_Coupon::get_uses()
Get the number of times the coupon has been used
Return Return
(int)
Source Source
File: includes/models/model.llms.coupon.php
public function get_uses() { $query = new WP_Query( array( 'meta_query' => array( array( 'key' => $this->meta_prefix . 'coupon_code', 'value' => $this->get( 'title' ), ), ), 'post_status' => 'any', 'post_type' => 'llms_order', 'posts_per_page' => -1, ) ); return $query->post_count; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |