Tribe__Tickets__Global_Stock::enable( bool $yes = true )
Enables global stock control for the current post.
Contents
As a convenience, false can be passed to this method to disable rather than enable global stock.
Parameters
- $yes
-
(bool) (Optional)
Default value: true
Return
(bool|int)
Source
File: src/Tribe/Global_Stock.php
public function enable( $yes = true ) {
return update_post_meta( $this->post_id, self::GLOBAL_STOCK_ENABLED, tribe_is_truthy( $yes ) );
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Added a return so we can check if it was enabled correctly |
| 4.1 | Introduced. |