Skip to content

Commit

Permalink
Define WP_IMPORTING before bulk importing videos
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinfodness committed Jul 23, 2024
1 parent ec47f9c commit 643ef73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/class-sync-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
Expand Down

0 comments on commit 643ef73

Please sign in to comment.