LLMS_Voucher::save_product( int $product_id )
Save products to a voucher
Parameters Parameters
- $product_id
-
(int) (Required) WP_Post ID of the product (course or membership).
Return Return
(int|false) The number of rows updated, or false on error.
Source Source
File: includes/class.llms.voucher.php
541 542 543 544 545 546 547 548 549 | public function save_product( $product_id ) { global $wpdb ; $data [ 'voucher_id' ] = $this ->id; $data [ 'product_id' ] = $product_id ; return $wpdb ->insert( $this ->get_product_to_voucher_table_name(), $data ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |