PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / classes / importer / batch-process / class-cartflows-importer-elementor-batch.php

class-cartflows-importer-elementor-batch.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.3.0, at classes/importer/batch-process/class-cartflows-importer-elementor-batch.php

71 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor Batch Process
4 *
5 * @package CartFlows
6 * @since 1.0.0
7 */
8
9 // Exit if accessed directly.
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13 if ( ! class_exists( 'Cartflows_Importer_Elementor_Batch' ) && class_exists( 'WP_Background_Process' ) ) :
14
15 /**
16 * Image Background Process
17 *
18 * @since 1.1.1 Updated class name with Elementor specific.
19 *
20 * @since 1.0.0
21 */
22 class Cartflows_Importer_Elementor_Batch extends WP_Background_Process {
23
24 /**
25 * Image Process
26 *
27 * @var string
28 */
29 protected $action = 'cartflows_elementor_image_process';
30
31 /**
32 * Task
33 *
34 * Override this method to perform any actions required on each
35 * queue item. Return the modified item for further processing
36 * in the next pass through. Or, return false to remove the
37 * item from the queue.
38 *
39 * @since 1.0.0
40 *
41 * @param integer $post_id Post Id.
42 * @return mixed
43 */
44 protected function task( $post_id ) {
45
46 $obj = new \Elementor\TemplateLibrary\CartFlows_Importer_Elementor();
47 $obj->import_single_template( $post_id );
48
49 return false;
50 }
51
52 /**
53 * Complete
54 *
55 * Override if applicable, but ensure that the below actions are
56 * performed, or, call parent::complete().
57 *
58 * @since 1.0.0
59 */
60 protected function complete() {
61
62 parent::complete();
63
64 do_action( 'cartflows_import_complete' );
65
66 }
67
68 }
69
70 endif;
71