diff --git a/src/class-sync-manager.php b/src/class-sync-manager.php index 35ee1b8..1a87622 100644 --- a/src/class-sync-manager.php +++ b/src/class-sync-manager.php @@ -75,6 +75,8 @@ public function maybe_schedule_sync(): void { * @throws Error If unable to parse the last sync as a DateTimeImmutable object. */ public function sync_videos(): void { + define( 'WP_IMPORTING', true ); // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound + // If there isn't a valid adapter, bail. if ( ! $this->adapter instanceof Adapter ) { throw new Error( esc_html__( 'WP Video Sync: Unable to sync videos without a valid adapter.', 'wp-video-sync' ) );