PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.1.4
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.1.4
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-gutenberg-batch.php

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

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