Automattic\WooCommerce\Internal\DataStores\StockNotifications
StockNotificationsDataStore::add_meta
Add meta.
Method of the class: StockNotificationsDataStore{}
No Hooks.
Returns
Int|false. The meta ID or false if the meta was not added.
Usage
$StockNotificationsDataStore = new StockNotificationsDataStore(); $StockNotificationsDataStore->add_meta( $notification, $meta );
- $notification(Notification) (required) (passed by reference — &)
- The data object to add.
- $meta(stdClass) (required)
- The meta object to add (containing ->key and ->value).
StockNotificationsDataStore::add_meta() StockNotificationsDataStore::add meta code WC 10.3.6
public function add_meta( &$notification, $meta ) {
$add_meta = $this->data_store_meta->add_meta( $notification, $meta );
$this->after_meta_change( $notification );
return $add_meta ? $add_meta : false;
}