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]. // @todo Remove required `allow_url_fopen` support. if ( ini_get( 'allow_url_fopen' ) ) { if ( is_plugin_active( 'elementor/elementor.php' ) ) { self::$process_all->push_to_queue( $post_id ); // Dispatch Queue. self::$process_all->save()->dispatch(); wcf()->logger->import_log( '(✓) Dispatch Request..' ); } } else { wcf()->logger->import_log( '(✕) Couldn\'t not import image due to allow_url_fopen() is disabled!' ); } } } /** * Kicking this off by calling 'get_instance()' method */ CartFlows_Batch_Process::get_instance(); endif;