Skip to content

Commit

Permalink
Merge pull request #432 from moderntribe/release/5.0.4
Browse files Browse the repository at this point in the history
packaged version 5.0.4
  • Loading branch information
chanceaclark committed Aug 18, 2023
2 parents de7facb + 479e579 commit a22ee23
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [5.0.4]

### Fixed
- Fix import stuck problem on step 6 - Updating Brands

## [5.0.3]

### Fixed
Expand Down Expand Up @@ -1894,6 +1899,7 @@
in fact, reset postdata, so far as Gutenberg 3.2.0 is concerned.


[5.0.4]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.3...5.0.4
[5.0.3]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.2...5.0.3
[5.0.2]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.0...5.0.1
Expand Down
2 changes: 1 addition & 1 deletion bigcommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: BigCommerce for WordPress
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.
Author: BigCommerce
Version: 5.0.3
Version: 5.0.4
Author URI: https://www.bigcommerce.com/wordpress
Requires PHP: 7.4.0
Text Domain: bigcommerce
Expand Down
2 changes: 1 addition & 1 deletion build-timestamp.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '5.19.04.03.2023');
define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '4.43.08.18.2023');
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: bigcommerce, moderntribe, jbrinley, becomevocal, vincentlistrani,
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
Requires at least: 5.2
Tested up to: 6.0.3
Stable tag: 5.0.3
Stable tag: 5.0.4
Requires PHP: 7.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down
8 changes: 4 additions & 4 deletions src/BigCommerce/Import/Processors/Brand_Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function get_source_data( $cursor = '' ): array {

if ( is_string( $response ) ) {
// Get next portion of brands
$this->get_source_data( $response );
return $this->get_source_data( $response );
}

return array_merge( $response, $this->get_option( self::BRANDS_CHECKPOINT, [] ) );
Expand Down Expand Up @@ -77,9 +77,9 @@ protected function get_fallback_terms() {

return $this->batch;
} catch ( \Throwable $e ) {
do_action( 'bigcommerce/import/error', $e->getMessage(), [
'response' => $e->getResponseBody(),
'headers' => $e->getResponseHeaders(),
do_action( 'bigcommerce/log', Error_Log::DEBUG, $e->getMessage(), [
'response' => method_exists( $e, 'getResponseBody' ) ? $e->getResponseBody() : $e->getTraceAsString(),
'headers' => method_exists( $e, 'getResponseHeaders' ) ? $e->getResponseHeaders() : '',
] );

do_action( 'bigcommerce/log', Error_Log::DEBUG, $e->getTraceAsString(), [] );
Expand Down
24 changes: 15 additions & 9 deletions src/BigCommerce/Import/Processors/Term_Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use BigCommerce\Import\Runner\Status;
use BigCommerce\Logging\Error_Log;
use BigCommerce\Taxonomies\Brand\Brand;
use BigCommerce\Taxonomies\Product_Category\Product_Category;

abstract class Term_Import implements Import_Processor {
use No_Cache_Options;
Expand Down Expand Up @@ -76,22 +77,27 @@ public function run() {

try {
$terms = $this->get_source_data();
// Fallback to old categories pull
if ( empty( $terms ) && $this->taxonomy() === Product_Category::NAME ) {
$terms = $this->get_fallback_terms();
$rest_fallback = true;
}
} catch ( \Throwable $e ) {
do_action( 'bigcommerce/log', $e->getMessage(), [
'response' => $e->getResponseBody(),
'headers' => $e->getResponseHeaders(),
do_action( 'bigcommerce/log', Error_Log::DEBUG, $e->getMessage(), [
'response' => method_exists( $e, 'getResponseBody' ) ? $e->getResponseBody() : $e->getTraceAsString(),
'headers' => method_exists( $e, 'getResponseHeaders' ) ? $e->getResponseHeaders() : '',
] );

$terms = $this->get_fallback_terms();
$rest_fallback = true;
}

if ( empty( $terms ) ) {
do_action( 'bigcommerce/log', Error_Log::DEBUG, sprintf( __( 'Could not find terms for %s. Wrapping up step and go to the next one', 'bigcommerce' ), $this->taxonomy() ), [] );
$status->set_status( $this->completed_state() );
$this->clear_state();
if ( empty( $terms ) ) {
do_action( 'bigcommerce/log', Error_Log::DEBUG, sprintf( __( 'Could not find terms for %s. Wrapping up step and go to the next one', 'bigcommerce' ), $this->taxonomy() ), [] );
$status->set_status( $this->completed_state() );
$this->clear_state();

return;
}
return;
}

// Allow more HTML in term descriptions than WP default
Expand Down
2 changes: 1 addition & 1 deletion src/BigCommerce/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace BigCommerce;

class Plugin {
const VERSION = '5.0.3';
const VERSION = '5.0.4';

protected static $_instance;

Expand Down

0 comments on commit a22ee23

Please sign in to comment.