diff --git a/packages/js/product-editor/changelog/update-product-editor-tweak-summary-block b/packages/js/product-editor/changelog/update-product-editor-tweak-summary-block new file mode 100644 index 00000000000..395d23fd57f --- /dev/null +++ b/packages/js/product-editor/changelog/update-product-editor-tweak-summary-block @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +[Product Block Editor]: minor Summary block enhancements diff --git a/packages/js/product-editor/src/blocks/product-fields/summary/edit.tsx b/packages/js/product-editor/src/blocks/product-fields/summary/edit.tsx index 049bf46d765..c186884c8a3 100644 --- a/packages/js/product-editor/src/blocks/product-fields/summary/edit.tsx +++ b/packages/js/product-editor/src/blocks/product-fields/summary/edit.tsx @@ -26,7 +26,7 @@ import { SummaryAttributes } from './types'; import { ALIGNMENT_CONTROLS } from './constants'; import { ProductEditorBlockEditProps } from '../../../types'; -export function Edit( { +export function SummaryBlockEdit( { attributes, setAttributes, context, @@ -36,7 +36,7 @@ export function Edit( { style: { direction }, } ); const contentId = useInstanceId( - Edit, + SummaryBlockEdit, 'wp-block-woocommerce-product-summary-field__content' ); const [ summary, setSummary ] = useEntityProp< string >( @@ -88,23 +88,30 @@ export function Edit( { - { __( '(OPTIONAL)', 'woocommerce' ) } - - ), - } - ) } + label={ + typeof label === 'undefined' + ? createInterpolateElement( + __( 'Summary', 'woocommerce' ), + { + optional: ( + + { __( + '(OPTIONAL)', + 'woocommerce' + ) } + + ), + } + ) + : label + } help={ - typeof helpText === 'string' - ? helpText - : __( + typeof helpText === 'undefined' + ? __( "Summarize this product in 1-2 short sentences. We'll show it at the top of the page.", 'woocommerce' ) + : helpText } >
diff --git a/packages/js/product-editor/src/blocks/product-fields/summary/index.ts b/packages/js/product-editor/src/blocks/product-fields/summary/index.ts index a8c8696ae1a..765b6911a19 100644 --- a/packages/js/product-editor/src/blocks/product-fields/summary/index.ts +++ b/packages/js/product-editor/src/blocks/product-fields/summary/index.ts @@ -2,7 +2,7 @@ * Internal dependencies */ import blockConfiguration from './block.json'; -import { Edit } from './edit'; +import { SummaryBlockEdit } from './edit'; import { registerProductEditorBlockType } from '../../../utils'; const { name, ...metadata } = blockConfiguration; @@ -11,7 +11,7 @@ export { name, metadata }; export const settings = { example: {}, - edit: Edit, + edit: SummaryBlockEdit, }; export function init() { diff --git a/plugins/woocommerce/changelog/41807-update-create-close-welcome-modal-util-e2e-pw b/plugins/woocommerce/changelog/41807-update-create-close-welcome-modal-util-e2e-pw new file mode 100644 index 00000000000..a1ffe814c6b --- /dev/null +++ b/plugins/woocommerce/changelog/41807-update-create-close-welcome-modal-util-e2e-pw @@ -0,0 +1,4 @@ +Significance: patch +Type: dev +Comment: Create closeWelcomeModal, goToPageEditor and goToPostEditor utils in PlayWright e2e tests + diff --git a/plugins/woocommerce/changelog/41833-fix-shipping-settings-no-defaults b/plugins/woocommerce/changelog/41833-fix-shipping-settings-no-defaults new file mode 100644 index 00000000000..602bd2b2eaf --- /dev/null +++ b/plugins/woocommerce/changelog/41833-fix-shipping-settings-no-defaults @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: Fixes a bug found in unreleased feature. No changelog needed. + diff --git a/plugins/woocommerce/changelog/41834-fix-shipping-settings-methods-no-configs b/plugins/woocommerce/changelog/41834-fix-shipping-settings-methods-no-configs new file mode 100644 index 00000000000..55dec50b784 --- /dev/null +++ b/plugins/woocommerce/changelog/41834-fix-shipping-settings-methods-no-configs @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: Fixes unreleased feature, no changelog required. + diff --git a/plugins/woocommerce/changelog/fix-40075-avoid-count-query-unless-after-first-page b/plugins/woocommerce/changelog/fix-40075-avoid-count-query-unless-after-first-page new file mode 100644 index 00000000000..76f50a1f25a --- /dev/null +++ b/plugins/woocommerce/changelog/fix-40075-avoid-count-query-unless-after-first-page @@ -0,0 +1,4 @@ +Significance: patch +Type: performance + +Prevent second query used to determine real post count from running if paging isn't being used. diff --git a/plugins/woocommerce/changelog/fix-40645-log-export b/plugins/woocommerce/changelog/fix-40645-log-export new file mode 100644 index 00000000000..7a6036721fd --- /dev/null +++ b/plugins/woocommerce/changelog/fix-40645-log-export @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add functionality and UI for downloading log files directly from WC Admin diff --git a/plugins/woocommerce/changelog/fix-41367-variations-alignment b/plugins/woocommerce/changelog/fix-41367-variations-alignment new file mode 100644 index 00000000000..4e30468de15 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-41367-variations-alignment @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fixed a vertical alignment issue in the variations selector diff --git a/plugins/woocommerce/changelog/fix-show-private-variations-in-upsells b/plugins/woocommerce/changelog/fix-show-private-variations-in-upsells new file mode 100644 index 00000000000..a9a67ce5551 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-show-private-variations-in-upsells @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Display variation upsells from private variable products to users with required permissions. diff --git a/plugins/woocommerce/changelog/update-41821_external_product_hide_tabs b/plugins/woocommerce/changelog/update-41821_external_product_hide_tabs new file mode 100644 index 00000000000..ddc47d03915 --- /dev/null +++ b/plugins/woocommerce/changelog/update-41821_external_product_hide_tabs @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Update product template for external products, hiding shipping and variation tabs. diff --git a/plugins/woocommerce/client/legacy/css/admin.scss b/plugins/woocommerce/client/legacy/css/admin.scss index ee55dfb54dd..051e83cc559 100644 --- a/plugins/woocommerce/client/legacy/css/admin.scss +++ b/plugins/woocommerce/client/legacy/css/admin.scss @@ -4115,7 +4115,7 @@ table.wc_shipping { .wc-backbone-modal-main article { padding: 0 32px 32px 32px; - + } .wc-backbone-modal-main header{ @@ -4124,7 +4124,7 @@ table.wc_shipping { .wc-backbone-modal-main footer { padding: 20px 32px 12px 32px; - + } .wc-backbone-modal-main .wc-backbone-modal-header h1 { @@ -4168,7 +4168,7 @@ table.wc_shipping { display: none; } } - + } .wc-shipping-method-add-class-costs { @@ -4186,7 +4186,7 @@ table.wc_shipping { height: 1px; overflow: hidden; position: absolute; - white-space: nowrap; + white-space: nowrap; width: 1px; &:checked + label { @@ -4237,7 +4237,7 @@ table.wc_shipping { font-size: 24px; } } - + .wc-shipping-zone-method-fields { & > label { @@ -4258,7 +4258,7 @@ table.wc_shipping { margin-bottom: 24px; position: relative; - input, + input, select { margin: 6px 0; padding: 12px; @@ -4362,7 +4362,7 @@ table { .edit { margin: 5px 0; } - + .edit > input, .edit > select { width: 100%; @@ -4390,7 +4390,7 @@ table { } } -.wc-shipping-class-hide-sibling-view + .view { +.wc-shipping-class-hide-sibling-view + .view { display: none; } @@ -4402,7 +4402,7 @@ table { display: inline-block; margin: 0 12px; } -} +} .wc-shipping-zone-heading-help-text { max-width: 800px; diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss index 1d630ee6e60..2d62431c432 100644 --- a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss +++ b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss @@ -182,9 +182,18 @@ } } + // Ensure variation label is vertically centered. + div.product form.cart table.variations td select { + min-width: 70%; // Fix for Safari. + } + + div.product form.cart table.variations td, div.product form.cart table.variations th { - // Ensure variation label is vertically centered. - line-height: 3.5rem; + vertical-align: middle; + } + + .single_variation_wrap .woocommerce-variation { + margin-bottom: var(--wp--style--block-gap); } } diff --git a/plugins/woocommerce/client/legacy/js/admin/wc-shipping-zone-methods.js b/plugins/woocommerce/client/legacy/js/admin/wc-shipping-zone-methods.js index 76a32f222d3..3a8b62232e7 100644 --- a/plugins/woocommerce/client/legacy/js/admin/wc-shipping-zone-methods.js +++ b/plugins/woocommerce/client/legacy/js/admin/wc-shipping-zone-methods.js @@ -569,6 +569,9 @@ status : 'new' } }); + } else { + shippingMethodView.model.trigger( 'change:methods' ); + shippingMethodView.model.trigger( 'saved:methods' ); } $( document.body ).trigger( 'init_tooltips' ); @@ -629,17 +632,6 @@ } } else if ( target === 'wc-modal-shipping-method-settings' ) { event.data.view.possiblyHideFreeShippingRequirements( data ); - const requiredFields = [ 'woocommerce_free_shipping_title', 'woocommerce_flat_rate_title', 'woocommerce_local_pickup_title' ]; - const requiredFieldPresent = requiredFields.find( ( field ) => { - return data.hasOwnProperty( field ) && field; - } ); - - if ( requiredFieldPresent ) { - const shouldDisable = data[ requiredFieldPresent ].length === 0; - const saveButton = document.getElementById( 'btn-ok' ); - saveButton.disabled = shouldDisable; - saveButton.classList.toggle( 'disabled', shouldDisable ); - } } }, onCloseConfigureShippingMethod: function( event, target, post_data, addButtonCalled ) { diff --git a/plugins/woocommerce/includes/abstracts/abstract-wc-product.php b/plugins/woocommerce/includes/abstracts/abstract-wc-product.php index 861180bbf68..9200e884f71 100644 --- a/plugins/woocommerce/includes/abstracts/abstract-wc-product.php +++ b/plugins/woocommerce/includes/abstracts/abstract-wc-product.php @@ -1603,7 +1603,7 @@ class WC_Product extends WC_Abstract_Legacy_Product { if ( $this->get_parent_id() ) { $parent_product = wc_get_product( $this->get_parent_id() ); - if ( $parent_product && 'publish' !== $parent_product->get_status() ) { + if ( $parent_product && 'publish' !== $parent_product->get_status() && ! current_user_can( 'edit_post', $parent_product->get_id() ) ) { $visible = false; } } diff --git a/plugins/woocommerce/includes/admin/settings/views/html-admin-page-shipping-zone-methods.php b/plugins/woocommerce/includes/admin/settings/views/html-admin-page-shipping-zone-methods.php index 79f1057c164..6ea03a78697 100644 --- a/plugins/woocommerce/includes/admin/settings/views/html-admin-page-shipping-zone-methods.php +++ b/plugins/woocommerce/includes/admin/settings/views/html-admin-page-shipping-zone-methods.php @@ -149,7 +149,7 @@ if ( ! defined( 'ABSPATH' ) ) {