/var/www/html_uk/wp-content/plugins/automatewoo/includes/Guest_Query.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
// phpcs:ignoreFile

namespace AutomateWoo;

if ( ! 
defined'ABSPATH' ) ) exit;

/**
 * @class Guest_Query
 * @since 2.0
 */
class Guest_Query extends Query_Abstract {

    
/** @var string */
    
public $table_id 'guests';

    
/** @var string  */
    
public $meta_table_id 'guest-meta';

    
/** @var string  */
    
protected $model 'AutomateWoo\Guest';


    
/**
     * @since 4.1
     * @param int|array $order_id
     * @param $compare bool|string - defaults to '=' or 'IN' if array
     * @return $this
     */
    
function where_most_recent_order$order_id$compare false ) {
        return 
$this->where'most_recent_order'$order_id$compare );
    }


    
/**
     * @since 4.2
     * @param string $version
     * @param $compare bool|string - defaults to '='
     * @return $this
     */
    
function where_version$version$compare false ) {
        return 
$this->where'version'aw_version_str_to_int$version ), $compare );
    }


    
/**
     * @return Guest[]
     */
    
function get_results() {
        return 
parent::get_results();
    }

}