Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@automattic/newspack-blocks

Package Overview
Dependencies
Maintainers
0
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automattic/newspack-blocks - npm Package Compare versions

Comparing version 4.3.0-epic-ras-acc.16 to 4.3.0-epic-ras-acc.17

2

package.json
{
"name": "@automattic/newspack-blocks",
"version": "4.3.0-epic-ras-acc.16",
"version": "4.3.0-epic-ras-acc.17",
"author": "Automattic",

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -95,2 +95,3 @@ /* eslint-disable @wordpress/no-unsafe-wp-apis */

const [ isChanging, setIsChanging ] = useState( false );
function fetchSuggestions( search ) {

@@ -104,3 +105,3 @@ setInFlight( true );

products.forEach( product => {
if ( product.purchasable ) {
if ( '' !== product.price || getNYP( product ).isNYP ) { // Variable products will populate price with one of the variations prices.
_suggestions[ product.id ] = `${ product.id }: ${ product.name }`;

@@ -205,3 +206,2 @@ }

setProductData( data );
// Handle product variation data.

@@ -211,3 +211,12 @@ if ( data?.variations?.length ) {

apiFetch( { path: `/wc/v2/products/${ data.id }/variations?per_page=100` } )
.then( res => setVariations( res ) )
.then( res => {
// Remove any variations without prices set.
const priced_variations = [];
res.forEach( re => {
if ( '' !== re.price || getNYP( re ).isNYP ) {
priced_variations.push( re );
}
} );
setVariations( priced_variations );
} )
.catch( () => setVariations( [] ) );

@@ -214,0 +223,0 @@ } else {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc