Choose an Elementor event template during or after migration
All checks were successful
WordPress release / release (push) Successful in 7s

This commit is contained in:
josh
2026-11-12 15:34:43 -05:00
parent 6df287d530
commit db4747d85f
8 changed files with 242 additions and 47 deletions

View File

@@ -47,7 +47,7 @@ final class Api {
}
}
private static function table(): string {
public static function table(): string {
global $wpdb;
return $wpdb->prefix . 'eventlabs_external_ids';
}
@@ -309,6 +309,9 @@ final class Api {
if ( is_wp_error( $result ) ) {
return $result;
}
if ( ! $id && 'events' === $resource && Legacy_Migration::SOURCE === ( $identity[0] ?? '' ) && ! empty( $payload['migration_template_id'] ) ) {
Single_Event_Templates::assign( $saved_id, (int) $payload['migration_template_id'] );
}
if ( $identity && ! $id && ! $wpdb->insert( self::table(), [
'sync_key' => $sync_key, 'post_id' => $saved_id, 'source' => $identity[0], 'external_id' => $identity[1],
], [ '%s', '%d', '%s', '%s' ] ) ) {