Skip to content

Commit d9915f0

Browse files
authored
Merge pull request #213 from moderntribe/release/3.19.0
packaged version 3.19.0
2 parents 945eccd + d93657d commit d9915f0

File tree

17 files changed

+90
-80
lines changed

17 files changed

+90
-80
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [3.19.0]
4+
5+
### Added
6+
7+
- Added some additional support for Flatsome theme minicart widget on mobile/smaller viewports.
8+
9+
### Fixed
10+
11+
- Featured and regular product sort order reflect order in BC store
12+
13+
314
## [3.18.1]
415

516
### Fixed
@@ -1168,6 +1179,7 @@
11681179
in fact, reset postdata, so far as Gutenberg 3.2.0 is concerned.
11691180

11701181

1182+
[3.19.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.18.1...3.19.0
11711183
[3.18.1]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.18.0...3.18.1
11721184
[3.18.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.17.0...3.18.0
11731185
[3.17.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/3.16.0...3.17.0

assets/css/master.css

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

assets/css/master.min.css

+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

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

assets/js/dist/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/src/public/cart/cart-menu-item.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const updateFlatsomeCartMenuPrice = (data = {}) => {
5353
};
5454

5555
const updateFlatsomeCartMenuQty = () => {
56-
const menuItemQty = tools.getNodes('.header-cart-link .cart-icon strong', false, document, true)[0];
56+
const menuItemQty = tools.getNodes('.header-cart-link .cart-icon strong', true, document, true);
5757

5858
if (!menuItemQty) {
5959
return;
@@ -65,7 +65,9 @@ const updateFlatsomeCartMenuQty = () => {
6565
currentCount = '0';
6666
}
6767

68-
menuItemQty.innerHTML = currentCount;
68+
menuItemQty.forEach((cartIcon) => {
69+
cartIcon.innerHTML = currentCount;
70+
});
6971
};
7072

7173
const updateMenuQtyOnPageLoad = () => {

assets/pcss/wp-themes/_flatsome.pcss

+28
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,32 @@
1212
padding-right: 28px;
1313
}
1414
}
15+
16+
.bigcommerce-cart__item-count.full {
17+
display: none;
18+
19+
@media (--viewport-medium) {
20+
display: inline-block;
21+
margin-left: 6px;
22+
}
23+
}
24+
25+
.widget_shopping_cart_content {
26+
27+
.bc-cart {
28+
@media (--viewport-medium) {
29+
overflow-y: scroll;
30+
max-height: calc(100vh - 180px);
31+
}
32+
}
33+
}
34+
35+
.off-canvas-right .mfp-content {
36+
width: 320px;
37+
}
38+
39+
.bc-mini-cart .bc-btn,
40+
.bc-mini-cart .bc-btn[disabled] {
41+
margin-right: 0;
42+
}
1543
}

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: 3.18.1
6+
Version: 3.19.0
77
Author URI: https://www.bigcommerce.com/wordpress
88
Requires PHP: 5.6.24
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', '8.06.04.30.2020');
2+
define('BIGCOMMERCE_ASSETS_BUILD_TIMESTAMP', '4.12.05.15.2020');

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: 4.6
55
Tested up to: 5.3
6-
Stable tag: 3.18.1
6+
Stable tag: 3.19.0
77
Requires PHP: 5.6.24
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html

src/BigCommerce/Import/Import_Strategy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace BigCommerce\Import;
44

55
interface Import_Strategy {
6-
const VERSION = '3.10.0';
6+
const VERSION = '3.19.0';
77

88
/**
99
* @return int The imported post ID

src/BigCommerce/Import/Importers/Products/Product_Builder.php

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ private function get_post_status() {
136136

137137
private function get_menu_order() {
138138
$sort_order = $this->sanitize_int( $this->product['sort_order'] );
139-
if ( $sort_order === 0 ) {
140-
$sort_order = 10;
141-
}
142139

143140
/**
144141
* Filter the menu order assigned to the product, based on the

src/BigCommerce/Plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace BigCommerce;
55

66
class Plugin {
7-
const VERSION = '3.18.1';
7+
const VERSION = '3.19.0';
88

99
protected static $_instance;
1010

src/BigCommerce/Post_Types/Product/Query.php

+2-53
Original file line numberDiff line numberDiff line change
@@ -55,59 +55,8 @@ public function filter_queries( \WP_Query $query ) {
5555
$query->set( 'orderby', [ 'date' => 'DESC', 'title' => 'ASC' ] );
5656
break;
5757
case Product_Archive::SORT_FEATURED:
58-
$select_filter = function ( $select, $wp_query ) use ( $query ) {
59-
if ( $wp_query !== $query ) {
60-
return $select;
61-
}
62-
$select .= ", COUNT(bcfeatured_terms.name) AS bcfeatured";
63-
64-
return $select;
65-
};
66-
$join_filter = function ( $join, $wp_query ) use ( $query ) {
67-
/** @var \wpdb $wpdb */
68-
global $wpdb;
69-
if ( $wp_query !== $query ) {
70-
return $join;
71-
}
72-
$join .= " LEFT JOIN {$wpdb->term_relationships} bcfeatured_tr ON bcfeatured_tr.object_id={$wpdb->posts}.ID";
73-
$join .= $wpdb->prepare( " LEFT JOIN {$wpdb->term_taxonomy} bcfeatured_tt ON bcfeatured_tr.term_taxonomy_id=bcfeatured_tt.term_taxonomy_id AND bcfeatured_tt.taxonomy=%s", Flag::NAME );
74-
$join .= $wpdb->prepare( " LEFT JOIN {$wpdb->terms} bcfeatured_terms ON bcfeatured_tt.term_id=bcfeatured_terms.term_id AND bcfeatured_terms.slug=%s", Flag::FEATURED );
75-
76-
return $join;
77-
};
78-
$orderby_filter = function ( $orderby, $wp_query ) use ( $query ) {
79-
if ( $wp_query !== $query ) {
80-
return $orderby;
81-
}
82-
/** @var \wpdb $wpdb */
83-
global $wpdb;
84-
$feature_sort = " bcfeatured DESC, {$wpdb->posts}.menu_order ASC ";
85-
$trimmed = trim( $orderby );
86-
if ( $trimmed === '' || $trimmed === "{$wpdb->posts}.post_title ASC" ) {
87-
return $feature_sort . ", {$wpdb->posts}.post_date DESC, {$wpdb->posts}.post_title ASC ";
88-
} else {
89-
return $feature_sort . ', ' . $orderby;
90-
}
91-
};
92-
$groupby_filter = function ( $groupby, $wp_query ) use ( $query ) {
93-
/** @var \wpdb $wpdb */
94-
global $wpdb;
95-
if ( $wp_query !== $query ) {
96-
return $groupby;
97-
}
98-
if ( empty( $groupby ) ) {
99-
$groupby = "{$wpdb->posts}.ID";
100-
}
101-
102-
return $groupby;
103-
};
104-
105-
add_filter( 'posts_fields', $select_filter, 10, 2 );
106-
add_filter( 'posts_join', $join_filter, 10, 2 );
107-
add_filter( 'posts_orderby', $orderby_filter, 10, 2 );
108-
add_filter( 'posts_groupby', $groupby_filter, 10, 2 );
109-
$query->set( 'orderby', 'title' );
110-
$query->set( 'order', 'ASC' );
58+
// Product 'featured' tag in BC store has no effect on sorting
59+
$query->set( 'orderby', [ 'menu_order' => 'ASC', 'title' => 'ASC', 'date' => 'DESC' ] );
11160
break;
11261
case Product_Archive::SORT_PRICE_ASC:
11362
$meta_query = $query->get( 'meta_query' ) ?: [];

vendor/autoload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
require_once __DIR__ . '/composer/autoload_real.php';
66

7-
return ComposerAutoloaderInit470c1dddd7461c42d7604bb15371b854::getLoader();
7+
return ComposerAutoloaderInitc7f57417901b86d5ae5b1dda4976bf60::getLoader();

vendor/composer/autoload_real.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInit470c1dddd7461c42d7604bb15371b854
5+
class ComposerAutoloaderInitc7f57417901b86d5ae5b1dda4976bf60
66
{
77
private static $loader;
88

@@ -19,15 +19,15 @@ public static function getLoader()
1919
return self::$loader;
2020
}
2121

22-
spl_autoload_register(array('ComposerAutoloaderInit470c1dddd7461c42d7604bb15371b854', 'loadClassLoader'), true, true);
22+
spl_autoload_register(array('ComposerAutoloaderInitc7f57417901b86d5ae5b1dda4976bf60', 'loadClassLoader'), true, true);
2323
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24-
spl_autoload_unregister(array('ComposerAutoloaderInit470c1dddd7461c42d7604bb15371b854', 'loadClassLoader'));
24+
spl_autoload_unregister(array('ComposerAutoloaderInitc7f57417901b86d5ae5b1dda4976bf60', 'loadClassLoader'));
2525

2626
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
2727
if ($useStaticLoader) {
2828
require_once __DIR__ . '/autoload_static.php';
2929

30-
call_user_func(\Composer\Autoload\ComposerStaticInit470c1dddd7461c42d7604bb15371b854::getInitializer($loader));
30+
call_user_func(\Composer\Autoload\ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::getInitializer($loader));
3131
} else {
3232
$classMap = require __DIR__ . '/autoload_classmap.php';
3333
if ($classMap) {
@@ -39,19 +39,19 @@ public static function getLoader()
3939
$loader->register(true);
4040

4141
if ($useStaticLoader) {
42-
$includeFiles = Composer\Autoload\ComposerStaticInit470c1dddd7461c42d7604bb15371b854::$files;
42+
$includeFiles = Composer\Autoload\ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::$files;
4343
} else {
4444
$includeFiles = require __DIR__ . '/autoload_files.php';
4545
}
4646
foreach ($includeFiles as $fileIdentifier => $file) {
47-
composerRequire470c1dddd7461c42d7604bb15371b854($fileIdentifier, $file);
47+
composerRequirec7f57417901b86d5ae5b1dda4976bf60($fileIdentifier, $file);
4848
}
4949

5050
return $loader;
5151
}
5252
}
5353

54-
function composerRequire470c1dddd7461c42d7604bb15371b854($fileIdentifier, $file)
54+
function composerRequirec7f57417901b86d5ae5b1dda4976bf60($fileIdentifier, $file)
5555
{
5656
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
5757
require $file;

vendor/composer/autoload_static.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInit470c1dddd7461c42d7604bb15371b854
7+
class ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60
88
{
99
public static $files = array (
1010
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
@@ -1060,10 +1060,10 @@ class ComposerStaticInit470c1dddd7461c42d7604bb15371b854
10601060
public static function getInitializer(ClassLoader $loader)
10611061
{
10621062
return \Closure::bind(function () use ($loader) {
1063-
$loader->prefixLengthsPsr4 = ComposerStaticInit470c1dddd7461c42d7604bb15371b854::$prefixLengthsPsr4;
1064-
$loader->prefixDirsPsr4 = ComposerStaticInit470c1dddd7461c42d7604bb15371b854::$prefixDirsPsr4;
1065-
$loader->prefixesPsr0 = ComposerStaticInit470c1dddd7461c42d7604bb15371b854::$prefixesPsr0;
1066-
$loader->classMap = ComposerStaticInit470c1dddd7461c42d7604bb15371b854::$classMap;
1063+
$loader->prefixLengthsPsr4 = ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::$prefixLengthsPsr4;
1064+
$loader->prefixDirsPsr4 = ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::$prefixDirsPsr4;
1065+
$loader->prefixesPsr0 = ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::$prefixesPsr0;
1066+
$loader->classMap = ComposerStaticInitc7f57417901b86d5ae5b1dda4976bf60::$classMap;
10671067

10681068
}, null, ClassLoader::class);
10691069
}

0 commit comments

Comments
 (0)