Skip to content

Commit 683c53c

Browse files
anaemnesismatticbot
authored andcommitted
Instant Search: Add option to show or hide product prices in results (#46454)
* Add New Toggle to Display Product Price These changes add a new toggle to the Jetpack Search Customizer screen. This new toggle, "Show price', allows the product price to be hidden when Jetpack Instant Search is configured with the "Product (for WooCommerce Stores)" result format. This is necessary to hide prices for users in countries where prices must be shown with VAT integrated into them. At present, Instant Search does not have the ability to show prices with VAT in Instant Search results. * Changelog Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/20960045298 Upstream-Ref: Automattic/jetpack@d490e6f
1 parent e7691ad commit 683c53c

File tree

15 files changed

+185
-160
lines changed

15 files changed

+185
-160
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"automattic/jetpack-publicize": "^0.70.0-alpha",
4848
"automattic/jetpack-redirect": "^3.0.9",
4949
"automattic/jetpack-roles": "^3.0.8",
50-
"automattic/jetpack-search": "^0.54.11-alpha",
50+
"automattic/jetpack-search": "^0.55.0-alpha",
5151
"automattic/jetpack-stats": "^0.17.7",
5252
"automattic/jetpack-stats-admin": "^0.30.4",
5353
"automattic/jetpack-status": "^6.1.2",

jetpack_vendor/automattic/jetpack-search/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.54.11-alpha] - unreleased
8+
## [0.55.0-alpha] - unreleased
99

1010
This is an alpha version! The changes listed here are not final.
1111

12+
### Added
13+
- Instant Search: Add a "Show price" option to allow prices to be shown or hidden in Jetpack Instant Search results.
14+
1215
### Changed
1316
- Update package dependencies.
1417

@@ -1421,7 +1424,7 @@ This is an alpha version! The changes listed here are not final.
14211424
- Updated package dependencies.
14221425
- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't.
14231426

1424-
[0.54.11-alpha]: https://github.com/Automattic/jetpack-search/compare/v0.54.10...v0.54.11-alpha
1427+
[0.55.0-alpha]: https://github.com/Automattic/jetpack-search/compare/v0.54.10...v0.55.0-alpha
14251428
[0.54.10]: https://github.com/Automattic/jetpack-search/compare/v0.54.9...v0.54.10
14261429
[0.54.9]: https://github.com/Automattic/jetpack-search/compare/v0.54.8...v0.54.9
14271430
[0.54.8]: https://github.com/Automattic/jetpack-search/compare/v0.54.7...v0.54.8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '33526084423e0b67ee4f');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '22a9214febd1c3143837');

jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-i18n', 'wp-jp-i18n-loader', 'wp-polyfill', 'wp-url'), 'version' => '0fdea6dc160d86a89550');
1+
<?php return array('dependencies' => array('wp-i18n', 'wp-jp-i18n-loader', 'wp-polyfill', 'wp-url'), 'version' => '75be4b99af5da8e881da');

jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jetpack_vendor/automattic/jetpack-search/src/class-helper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ public static function generate_initial_javascript_state() {
907907
'enableInfScroll' => get_option( $prefix . 'inf_scroll', '1' ) === '1',
908908
'enableFilteringOpensOverlay' => get_option( $prefix . 'filtering_opens_overlay', '1' ) === '1',
909909
'enablePostDate' => get_option( $prefix . 'show_post_date', '1' ) === '1',
910+
'enableProductPrice' => get_option( $prefix . 'show_product_price', '1' ) === '1',
910911
'enableSort' => get_option( $prefix . 'enable_sort', '1' ) === '1',
911912
'highlightColor' => get_option( $prefix . 'highlight_color', '#FFC' ),
912913
'overlayTrigger' => get_option( $prefix . 'overlay_trigger', Options::DEFAULT_OVERLAY_TRIGGER ),

jetpack_vendor/automattic/jetpack-search/src/class-package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Search package general information
1616
*/
1717
class Package {
18-
const VERSION = '0.54.11-alpha';
18+
const VERSION = '0.55.0-alpha';
1919
const SLUG = 'search';
2020

2121
/**

jetpack_vendor/automattic/jetpack-search/src/class-settings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function settings_register() {
5050
array( $setting_prefix . 'inf_scroll', 'boolean', true ),
5151
array( $setting_prefix . 'filtering_opens_overlay', 'boolean', true ),
5252
array( $setting_prefix . 'show_post_date', 'boolean', true ),
53+
array( $setting_prefix . 'show_product_price', 'boolean', true ),
5354
array( $setting_prefix . 'show_powered_by', 'boolean', true ),
5455
);
5556
foreach ( $settings as $value ) {

0 commit comments

Comments
 (0)