Skip to content

Commit 0f42210

Browse files
authored
packaged version 4.23.0 (#326)
Co-authored-by: Mykhailo Los <[email protected]>
1 parent 5a12b81 commit 0f42210

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+971
-246
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [4.23.0]
4+
5+
### Added
6+
- In order to speed up the import process running import tasks in parallel was added. The option can be enabled in Bigcommerce > Settings > Product Sync. Enabling it will add an additional background task runs on listings, channels initialization, and product data fetching.
7+
- Added support for customer webhooks, which will enable real-time data syncing between BigCommerce and BC4WP for customer related data, such as new customers being created and updated login settings. The options can be enabled during onboarding process or in Bigcommerce > Settings > Product Sync
8+
9+
### Fixed
10+
- Improve import process performance, optimize cleanup queries in order to reduce server resource consumption. Perform an additional cleanup before import starts.
11+
312
## [4.22.0]
413

514
### Added
@@ -1679,6 +1688,7 @@
16791688
in fact, reset postdata, so far as Gutenberg 3.2.0 is concerned.
16801689

16811690

1691+
[4.23.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/4.22.0...4.23.0
16821692
[4.22.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/4.21.1...4.22.0
16831693
[4.21.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/4.20.1...4.21.0
16841694
[4.20.1]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/4.20.0...4.20.1

assets/js/dist/admin/gutenberg/scripts.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/gutenberg/scripts.min.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/scripts.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/admin/scripts.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/scripts.js

+40-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/scripts.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/vendor.js

+46-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/dist/vendor.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/src/admin/shortcode-ui/ajax-query.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ const createSpinLoader = () => {
2929
opacity: 0.5,
3030
};
3131

32-
return new Spinner(options).spin(el.loader);
32+
const spinner = new Spinner(options).spin(el.loader);
33+
34+
if (spinner.el) {
35+
spinner.el.setAttribute('aria-label', I18N.operations.loading);
36+
}
3337
};
3438

3539
/**

assets/js/src/public/banners/banners.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const init = () => {
4040
}
4141

4242
// append banner to location
43-
banners[banner.location] += bannerContent(banner.content);
43+
banners[banner.location] += bannerContent(banner.content, banner.name);
4444
});
4545

4646
const styles = `background-color: ${GLOBALS.BANNERS.bg_color}; color: ${GLOBALS.BANNERS.text_color};`;

assets/js/src/public/buttons/pagination.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,18 @@ const createSpinLoader = (itemContainer = '') => {
3535
}
3636

3737
const container = tools.closest(itemContainer, '.bc-load-items');
38-
const spinner = tools.getNodes('.bc-load-items__loader', false, container, true)[0];
38+
const loader = tools.getNodes('.bc-load-items__loader', false, container, true)[0];
3939
const spinnerOptions = {
4040
opacity: 0.5,
4141
scale: 0.5,
4242
lines: 12,
4343
};
4444

45-
new Spinner(spinnerOptions).spin(spinner);
45+
const spinner = new Spinner(spinnerOptions).spin(loader);
46+
47+
if (spinner.el) {
48+
spinner.el.setAttribute('aria-label', NLS.operations.loading);
49+
}
4650
};
4751

4852
/**

assets/js/src/public/cart/shipping-calculator.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ const createSpinner = () => {
115115
lines: 12,
116116
};
117117

118-
new Spinner(spinnerOptions).spin(el.spinner);
118+
const spinner = new Spinner(spinnerOptions).spin(el.spinner);
119+
120+
if (spinner.el) {
121+
spinner.el.setAttribute('aria-label', NLS.operations.loading);
122+
}
119123
};
120124

121125
/**

assets/js/src/public/templates/banners.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export const bannerContent = content => (
2-
`<div class="bc-banner">${content}</div>`
1+
export const bannerContent = (content, label) => (
2+
`<aside class="bc-banner" aria-label="${label}">${content}</aside>`
33
);
44

55
export const bannerWrapper = (styles = null, banners = null) => (

bigcommerce.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: BigCommerce for WordPress
44
Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics.
55
Author: BigCommerce
6-
Version: 4.22.0
6+
Version: 4.23.0
77
Author URI: https://www.bigcommerce.com/wordpress
88
Requires PHP: 7.4.0
99
Text Domain: bigcommerce

build-timestamp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?php
2-
define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '4.45.12.17.2021');
2+
define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '5.41.01.24.2022');

readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: bigcommerce, moderntribe, jbrinley, becomevocal, vincentlistrani,
33
Tags: ecommerce, online store, sell online, storefront, retail, online shop, bigcommerce, big commerce, e-commerce, physical products, buy buttons, commerce, shopping cart, checkout, cart, shop, headless commerce, shipping, payments, fulfillment
44
Requires at least: 5.2
55
Tested up to: 5.8.1
6-
Stable tag: 4.22.0
6+
Stable tag: 4.23.0
77
Requires PHP: 7.4.0
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html

src/BigCommerce/Assets/Admin/JS_Localization.php

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function get_data() {
4545
'no_resources_json_data' => __( 'There was an error retrieving the resources data. Please refresh this page and try again.', 'bigcommerce' ),
4646
],
4747
'operations' => [
48+
'loading' => __( 'Loading', 'bigcommerce' ),
4849
'query_string_separator' => __( '&', 'bigcommerce' ),
4950
],
5051
'text' => [

src/BigCommerce/Assets/Theme/JS_Localization.php

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function get_data() {
1818

1919
$js_i18n_array = [
2020
'operations' => [
21+
'loading' => __( 'Loading', 'bigcommerce' ),
2122
'query_string_separator' => __( '&', 'bigcommerce' ),
2223
],
2324
'cart' => [

src/BigCommerce/Container/Import.php

+18-8
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
use Pimple\Container;
1818

1919
class Import extends Provider {
20-
const CRON_MONITOR = 'import.cron.monitor';
21-
const CRON_RUNNER = 'import.cron.runner';
22-
const LOCK_MONITOR = 'import.lock.monitor';
23-
const TIMEOUT = 'timeout';
20+
const CRON_MONITOR = 'import.cron.monitor';
21+
const CRON_RUNNER = 'import.cron.runner';
22+
const PARALLEL_RUNNER = 'import.async.runner';
23+
const LOCK_MONITOR = 'import.lock.monitor';
24+
const TIMEOUT = 'timeout';
2425

2526
const TASK_MANAGER = 'import.task_manager';
2627
const TASK_LIST = 'import.task_list';
@@ -72,6 +73,10 @@ private function cron( Container $container ) {
7273
return new Runner\Cron_Runner();
7374
};
7475

76+
$container[ self::PARALLEL_RUNNER ] = function ( Container $container ) {
77+
return new Runner\AsyncProcessing_Runner();
78+
};
79+
7580
add_action( 'init', $this->create_callback( 'cron_init', function () use ( $container ) {
7681
if ( $container[ Settings::CONFIG_STATUS ] >= Settings::STATUS_CHANNEL_CONNECTED ) {
7782
$container[ self::CRON_MONITOR ]->check_for_scheduled_crons();
@@ -106,9 +111,12 @@ private function cron( Container $container ) {
106111
$container[ self::CRON_RUNNER ]->continue_import();
107112
} ), 10, 0 );
108113

109-
add_action( 'wp_ajax_' . Import_Status::AJAX_ACTION_IMPORT_STATUS, $this->create_callback( 'ajax_continue', function () use ( $container ) {
110-
$container[ self::CRON_RUNNER ]->ajax_continue_import();
111-
} ), 5, 0 );
114+
add_action( Runner\AsyncProcessing_Runner::CONTINUE_IMPORT, $this->create_callback( 'async_import_run', function () use ( $container ) {
115+
if ( ! Import_Status::is_parallel_run_enabled() ) {
116+
return;
117+
}
118+
$container[ self::PARALLEL_RUNNER ]->run();
119+
} ), 10, 0 );
112120
}
113121

114122
private function process( Container $container ) {
@@ -171,7 +179,7 @@ private function process( Container $container ) {
171179
};
172180

173181
$container[ self::QUEUE ] = function ( Container $container ) {
174-
return new Processors\Queue_Runner( $container[ Api::FACTORY ]->catalog(), $container[ self::BATCH_SIZE ], 10 );
182+
return new Processors\Queue_Runner( $container[ Api::FACTORY ]->catalog(), $container[ self::BATCH_SIZE ], 5 );
175183
};
176184

177185
$container[ self::STORE ] = function ( Container $container ) {
@@ -197,6 +205,8 @@ private function process( Container $container ) {
197205

198206
$start = $this->create_callback( 'process_start', function () use ( $container ) {
199207
$container[ self::START ]->run();
208+
// Run pre import cleanup process. Set abort = false, pre_import = true
209+
$container[ self::CLEANUP ]->run( false, true );
200210
} );
201211
add_action( 'bigcommerce/import/start', $start, 10, 0 );
202212

0 commit comments

Comments
 (0)