WordPress at Your Fingertips
function is not described

ActionScheduler_HybridStore::set_demarkation_id() private WC 1.0

Store the demarkation id in WP options.

{} It's a method of the class: ActionScheduler_HybridStore{}

No Hooks.


Int. The new ID.


// private - for code of main (parent) class only
$result = $this->set_demarkation_id( $id );
The ID to set as the demarkation point between the two stores Leave null to use the next ID from the WP posts table.
Default: null

Code of ActionScheduler_HybridStore::set_demarkation_id() WC 6.1.1

private function set_demarkation_id( $id = null ) {
	if ( empty( $id ) ) {
		/** @var \wpdb $wpdb */
		global $wpdb;
		$id = (int) $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" );
		$id ++;
	update_option( self::DEMARKATION_OPTION, $id );

	return $id;