ActionScheduler_HybridStore::set_demarkation_id()
Store the demarkation id in WP options.
Method of the class: ActionScheduler_HybridStore{}
No Hooks.
Return
Int
. The new ID.
Usage
// private - for code of main (parent) class only $result = $this->set_demarkation_id( $id );
- $id(int)
- 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
ActionScheduler_HybridStore::set_demarkation_id() ActionScheduler HybridStore::set demarkation id code WC 9.3.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; }