ActionScheduler_DBStore::create_groupprotectedWC 1.0

Create an action group.

Method of the class: ActionScheduler_DBStore{}

No Hooks.

Returns

Int. Group ID.

Usage

// protected - for code of main (parent) or child class
$result = $this->create_group( $slug );
$slug(string) (required)
Group slug.

ActionScheduler_DBStore::create_group() code WC 9.9.5

protected function create_group( $slug ) {
	/**
	 * Global.
	 *
	 * @var \wpdb $wpdb
	 */
	global $wpdb;

	$wpdb->insert( $wpdb->actionscheduler_groups, array( 'slug' => $slug ) );

	return (int) $wpdb->insert_id;
}