Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit fea3744

Browse files
authored
Featured Product: Remove ability to change source product (#415)
1 parent 9b288cd commit fea3744

File tree

1 file changed

+0
-22
lines changed
  • assets/js/blocks/featured-product

1 file changed

+0
-22
lines changed

assets/js/blocks/featured-product/block.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,6 @@ class FeaturedProduct extends Component {
126126

127127
return (
128128
<InspectorControls key="inspector">
129-
<PanelBody
130-
title={ __( 'Product', 'woo-gutenberg-products-block' ) }
131-
initialOpen={ false }
132-
>
133-
<ProductControl
134-
selected={ attributes.productId || 0 }
135-
onChange={ ( value = [] ) => {
136-
const id = value[ 0 ] ? value[ 0 ].id : 0;
137-
setAttributes( { productId: id, mediaId: 0, mediaSrc: '' } );
138-
} }
139-
/>
140-
</PanelBody>
141129
<PanelBody title={ __( 'Content', 'woo-gutenberg-products-block' ) }>
142130
<ToggleControl
143131
label={ __( 'Show description', 'woo-gutenberg-products-block' ) }
@@ -255,16 +243,6 @@ class FeaturedProduct extends Component {
255243
setAttributes( { contentAlign: nextAlign } );
256244
} }
257245
/>
258-
<Toolbar
259-
controls={ [
260-
{
261-
icon: 'edit',
262-
title: __( 'Edit' ),
263-
onClick: () => setAttributes( { editMode: ! editMode } ),
264-
isActive: editMode,
265-
},
266-
] }
267-
/>
268246
<MediaUploadCheck>
269247
<Toolbar>
270248
<MediaUpload

0 commit comments

Comments
 (0)