logger->import_log( '(✓) BATCH Process Complete!' ); } /** * Start Image Import * * @param integer $post_id Post Id. * * @return void */ public function start_batch_process( $post_id = '' ) { wcf()->logger->import_log( '(✓) BATCH Started!' ); wcf()->logger->import_log( '(✓) Step ID ' . $post_id ); // Add "elementor" in import [queue]. if ( self::$batch_instance_bb ) { // Add to queue. self::$batch_instance_bb->push_to_queue( $post_id ); // Dispatch Queue. self::$batch_instance_bb->save()->dispatch(); wcf()->logger->import_log( '(✓) Dispatch "Beaver Builder" Request..' ); } elseif ( self::$batch_instance_elementor ) { // Add to queue. self::$batch_instance_elementor->push_to_queue( $post_id ); // Dispatch Queue. self::$batch_instance_elementor->save()->dispatch(); wcf()->logger->import_log( '(✓) Dispatch "Elementor" Request..' ); } else { wcf()->logger->import_log( '(✕) Could not import image due to allow_url_fopen() is disabled!' ); } } } /** * Kicking this off by calling 'get_instance()' method */ CartFlows_Batch_Process::get_instance(); endif;