LLMS_Voucher::save_voucher_code( array $data )
Save a voucher code
Parameters Parameters
- $data
-
(array) (Required) Voucher data.
Return Return
(int|false) The number of rows inserted, or false on error.
Source Source
File: includes/class.llms.voucher.php
public function save_voucher_code( $data ) { global $wpdb; $data['voucher_id'] = $this->id; $data['created_at'] = date( 'Y-m-d H:i:s' ); $data['updated_at'] = date( 'Y-m-d H:i:s' ); return $wpdb->insert( $this->get_codes_table_name(), $data ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |