Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
* @link https://themeum.com * @since 3.0.0 */ namespace Tutor\Models; use Tutor\Helpers\QueryHelper; /** * Billing model class for performing billing functionalities */ class BillingModel { /** * Fillable fields * * @var array */ private $fillable_fields = array( 'billing_first_name', 'billing_last_name', 'billing_email', 'billing_phone', 'billing_zip_code', 'billing_address', 'billing_country', 'billing_state', 'billing_city', ); /** * Required fields * * @var array */ private $required_fields = array( 'billing_first_name', 'billing_last_name', 'billing_email', 'billing_phone', 'billing_zip_code', 'billing_address', 'billing_country', 'billing_state', 'billing_city', ); /** * Get fillable fields * * @return array */ public function get_fillable_fields() { return $this->fillable_fields; } /** * Get required fields * * @return array */ public function get_required_fields() { return $this->required_fields; } /** * Insert billing info * * @param array $data Bulling info data. * * @return int The ID of the inserted row on success, or 0 on failure. */ public function insert( $data ) { global $wpdb; return QueryHelper::insert( "{$wpdb->prefix}tutor_customers", $data, ); } /** * Update billing info * * @param array $data Bulling info data. * @param array $where Where condition. * * @return bool True on success, false on failure. */ public function update( $data, $where ) { global $wpdb; return QueryHelper::update( "{$wpdb->prefix}tutor_customers", $data, $where, ); } /** * Get billing info * * @param int $user_id User ID. * * @return object|false The billing info as an object if found, or false if not found. */ public function get_info( $user_id ) { global $wpdb; $billing_info = QueryHelper::get_row( "{$wpdb->prefix}tutor_customers", array( 'user_id' => $user_id, ), 'id' ); return $billing_info; } }