PluginProbe
CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online). / 2.3.0
CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online). v2.3.0
3.0.3 3.0.2 3.0.1 trunk 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.3.0 2.3.1 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 All 65 releases
← All changes | data-sync.php +13 -2 2.3.42.3.0 View file →
@@ -70,10 +70,17 @@
70 70
71 71 // Slice the category array to start from the last synced category index
72 72 if ( ! empty( $categories ) ) {
73 73 foreach ( $categories as $category_index => $category_id ) {
74 + // get last backed up page number for particular category Id.
75 + // And start syncing from the last synced page.
76 + // If no page number available, it will start from zero.
77 + $last_synced_page = get_option( 'cmbird_group_item_sync_page_cat_id_' . $category_id );
78 + if ( ! intval( $last_synced_page ) ) {
79 + $last_synced_page = 1;
80 + }
74 81 $data = array(
75 - 'page' => 1,
82 + 'page' => $last_synced_page,
76 83 'category' => $category_id,
77 84 );
78 85 $existing_schedule = as_has_scheduled_action( 'import_group_items_cron', $data );
79 86 // Schedule the action if it doesn't exist.
@@ -123,10 +130,14 @@
123 130 if ( empty( $categories ) ) {
124 131 wp_send_json_error( array( 'message' => __( 'Please select at least one category from cron tab', 'commercebird' ) ) );
125 132 } else {
126 133 foreach ( $categories as $index => $category_id ) {
134 + $last_synced_page = get_option( 'cmbird_simple_item_sync_page_cat_id_' . $category_id );
135 + if ( ! intval( $last_synced_page ) ) {
136 + $last_synced_page = 1;
137 + }
127 138 $data = array(
128 - 'page' => 1,
139 + 'page' => $last_synced_page,
129 140 'category' => $category_id,
130 141 );
131 142 $existing_schedule = as_has_scheduled_action( 'import_simple_items_cron', $data );
132 143 if ( ! $existing_schedule ) {