Merge branch 'trunk' into fix/48298-css-class-abstractproductgrid
This commit is contained in:
commit
97c0f838c0
|
@ -31,24 +31,25 @@
|
|||
- team: vortex
|
||||
|
||||
"packages/js/components/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"packages/js/csv-export/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/currency/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/customer-effort-score/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"packages/js/data/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"packages/js/date/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/dependency-extraction-webpack-plugin/**/*":
|
||||
- team: vortex
|
||||
|
@ -57,26 +58,27 @@
|
|||
- team: vortex
|
||||
|
||||
"packages/js/experimental/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/explat/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"packages/js/navigation/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/number/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/onboarding/**/*":
|
||||
- team: ghidorah
|
||||
|
||||
"packages/js/product-editor/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
|
||||
"packages/js/tracks/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"plugins/woocommerce/**/*":
|
||||
- team: proton
|
||||
|
@ -89,7 +91,7 @@
|
|||
- team: proton
|
||||
|
||||
"plugins/woocommerce/src/Admin/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"plugins/woocommerce/src/Blocks/**/*":
|
||||
|
@ -97,7 +99,7 @@
|
|||
- team: woo-fse
|
||||
|
||||
"plugins/woocommerce/src/Internal/Admin/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"plugins/woocommerce/src/StoreApi/**/*":
|
||||
|
@ -105,7 +107,7 @@
|
|||
- team: woo-fse
|
||||
|
||||
"plugins/woocommerce-admin/**/*":
|
||||
- team: mothra
|
||||
- team: woo-fse
|
||||
- team: ghidorah
|
||||
|
||||
"plugins/woocommerce-blocks/**/*":
|
||||
|
|
|
@ -162,7 +162,7 @@ jobs:
|
|||
else
|
||||
MESSAGE="${{ github.event_name }}"
|
||||
fi
|
||||
echo "BUILDKITE_ANALYTICS_MESSAGE=$MESSAGE" >> "$GITHUB_OUTPUT"
|
||||
echo "BUILDKITE_ANALYTICS_MESSAGE=$MESSAGE" >> "$GITHUB_ENV"
|
||||
shell: bash
|
||||
|
||||
- name: 'Resolve artifacts path'
|
||||
|
|
|
@ -1,45 +1,51 @@
|
|||
name: 'Process stale needs-feedback issues'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '21 0 * * *'
|
||||
schedule:
|
||||
- cron: '21 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
permissions: { }
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Scan issues
|
||||
uses: actions/stale@v9.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: "As a part of this repository's maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.\n\n###### After 7 days with no activity this issue will be automatically be closed."
|
||||
close-issue-message: 'This issue was closed because it has been 14 days with no activity.'
|
||||
operations-per-run: 140
|
||||
days-before-stale: -1
|
||||
days-before-close: -1
|
||||
days-before-issue-stale: 7
|
||||
days-before-issue-close: 7
|
||||
stale-issue-label: 'status: stale'
|
||||
stale-pr-label: 'status: stale'
|
||||
exempt-issue-labels: 'type: enhancement'
|
||||
only-issue-labels: 'needs: author feedback'
|
||||
close-issue-label: "status: can't reproduce"
|
||||
ascending: true
|
||||
- name: Close Stale Flaky Test Issues
|
||||
uses: actions/stale@v9.0.0
|
||||
with:
|
||||
only-labels: 'metric: flaky e2e test, team: Vortex'
|
||||
days-before-stale: 5
|
||||
days-before-close: 2
|
||||
stale-issue-label: 'metric: stale flaky e2e test report'
|
||||
stale-issue-message: 'This test may have been a one-time failure. It will be auto-closed if no further activity occurs within the next 2 days.'
|
||||
close-issue-message: 'Auto-closed due to inactivity. Please re-open if you believe this issue is still valid.'
|
||||
close-issue-reason: 'not_planned'
|
||||
remove-stale-when-updated: true
|
||||
exempt-all-assignees: true
|
||||
enable-statistics: true
|
||||
stale:
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Scan issues
|
||||
uses: actions/stale@v9.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: "As a part of this repository's maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.\n\n###### After 7 days with no activity this issue will be automatically be closed."
|
||||
close-issue-message: 'This issue was closed because it has been 14 days with no activity.'
|
||||
operations-per-run: 140
|
||||
days-before-stale: -1
|
||||
days-before-close: -1
|
||||
days-before-issue-stale: 7
|
||||
days-before-issue-close: 7
|
||||
stale-issue-label: 'status: stale'
|
||||
stale-pr-label: 'status: stale'
|
||||
exempt-issue-labels: 'type: enhancement'
|
||||
only-issue-labels: 'needs: author feedback'
|
||||
close-issue-label: "status: can't reproduce"
|
||||
ascending: true
|
||||
- name: Process Stale Flaky Test Issues
|
||||
uses: actions/stale@v9.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
only-issue-labels: 'metric: flaky e2e test'
|
||||
days-before-stale: -1
|
||||
days-before-close: -1
|
||||
days-before-issue-stale: 5
|
||||
days-before-issue-close: 2
|
||||
stale-issue-label: 'status: stale'
|
||||
stale-issue-message: 'This issue is being marked as stale due to inactivity. It will be auto-closed if no further activity occurs within the next 2 days.'
|
||||
close-issue-message: 'Auto-closed due to inactivity. Please re-open if you believe this issue is still valid.'
|
||||
close-issue-reason: 'not_planned'
|
||||
remove-stale-when-updated: true
|
||||
exempt-all-assignees: false
|
||||
enable-statistics: true
|
||||
ascending: true
|
||||
operations-per-run: 120
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"dependencies": [
|
||||
"pnpm"
|
||||
],
|
||||
"pinVersion": "^9.1.0",
|
||||
"pinVersion": "9.1.3",
|
||||
"packages": [
|
||||
"**"
|
||||
]
|
||||
|
@ -172,7 +172,7 @@
|
|||
"packages": [
|
||||
"**"
|
||||
],
|
||||
"pinVersion": "^1.45.1"
|
||||
"pinVersion": "^1.46.1"
|
||||
},
|
||||
{
|
||||
"dependencies": [
|
||||
|
|
|
@ -4,7 +4,7 @@ This document aims to provide as much context as possible to aid in the developm
|
|||
|
||||
## Getting Started
|
||||
|
||||
Please refer to [the Getting Started section of the `README.md`](README.md#getting-started) for a general-purpose guide on getting started. The rest of this document will assume that you've installed all of the prequisites and setup described there.
|
||||
Please refer to [the Getting Started section of the `README.md`](README.md#getting-started) for a general-purpose guide on getting started. The rest of this document will assume that you've installed all of the prerequisites and setup described there.
|
||||
|
||||
### Plugin, Package, and Tool Filtering
|
||||
|
||||
|
|
360
changelog.txt
360
changelog.txt
|
@ -1,5 +1,336 @@
|
|||
== Changelog ==
|
||||
|
||||
= 9.2.1 2024-08-21 =
|
||||
|
||||
**WooCommerce**
|
||||
|
||||
* Fix - Revert turning of AccessiblePrivateMethods::_accessible_private_methods into a static property because it caused fatal errors in some edge cases. [#50809](https://github.com/woocommerce/woocommerce/pull/50809)
|
||||
|
||||
= 9.2.0 2024-08-20 =
|
||||
|
||||
**WooCommerce**
|
||||
|
||||
* Update - Enhanced sanitization in `@woocommerce/currency`. [#50802](https://github.com/woocommerce/woocommerce/pull/50802)
|
||||
* Fix - Hardening against XSS by leveraging HTML API for adding block attribute data. [#50801](https://github.com/woocommerce/woocommerce/pull/50801)
|
||||
* Fix - Prevent downloads of digitial products after partial refund. [#50804](https://github.com/woocommerce/woocommerce/pull/50804)
|
||||
* Add - Adds support for tracking downloads when a partial (ranged) request is made. [#50805](https://github.com/woocommerce/woocommerce/pull/50805)
|
||||
* Update - Turn AccessiblePrivateMethods::_accessible_private_methods into a static property. [#50806](https://github.com/woocommerce/woocommerce/pull/50806)
|
||||
* Fix - Correct label of shipping dimensions length field. [#50180](https://github.com/woocommerce/woocommerce/pull/50180)
|
||||
* Fix - Allow new accounts to set new password even if logged in. [#50700](https://github.com/woocommerce/woocommerce/pull/50700)
|
||||
* Fix - Remove global_unique_id from interface and add warning in case it is not implemented [#50685](https://github.com/woocommerce/woocommerce/pull/50685)
|
||||
* Fix - CYS: avoid to enqueue Jetpack scripts [#50679](https://github.com/woocommerce/woocommerce/pull/50679)
|
||||
* Fix - Clear product unique ID (`global_unique_id`) when duplicating products. [#50629](https://github.com/woocommerce/woocommerce/pull/50629)
|
||||
* Fix - Resolved an issue that caused the page title and content text to display in the incorrect order on the Order Confirmation page. [#50592](https://github.com/woocommerce/woocommerce/pull/50592)
|
||||
* Fix - Customer Account - Maintain the size of the icon in smaller screens. [#50410](https://github.com/woocommerce/woocommerce/pull/50410)
|
||||
* Fix - Accessibility: Prevent shipping losing focus when making selections during checkout. [#48370](https://github.com/woocommerce/woocommerce/pull/48370)
|
||||
* Fix - Add aria-label to mini-cart button on first render to improve accessibility [#48329](https://github.com/woocommerce/woocommerce/pull/48329)
|
||||
* Fix - Add missing script dependencies to product variation generation script. [#49595](https://github.com/woocommerce/woocommerce/pull/49595)
|
||||
* Fix - Address timing issue with React 18 when unregistering blocks and add missing dependency to editor bootstrapping code. [#49642](https://github.com/woocommerce/woocommerce/pull/49642)
|
||||
* Fix - Add the "Customer account" block into the "Minimal Header" to fix the spacing. [#49893](https://github.com/woocommerce/woocommerce/pull/49893)
|
||||
* Fix - Avoid Product Search Results block template to fall back to the Product Catalog template from the theme [#48887](https://github.com/woocommerce/woocommerce/pull/48887)
|
||||
* Fix - Changed from using React.render to React.createRoot for product editor areas as it has been deprecated since React 18 [#48834](https://github.com/woocommerce/woocommerce/pull/48834)
|
||||
* Fix - Check if parent product exists when creating attribute lookup data for variations [#49474](https://github.com/woocommerce/woocommerce/pull/49474)
|
||||
* Fix - Check if there's an actual session available inside wc_clear_cart_after_payment [#45821](https://github.com/woocommerce/woocommerce/pull/45821)
|
||||
* Fix - Comment: Update db_version variable and use it to prevent adding global_unique_id when the lookup table was not yet updated [#49472](https://github.com/woocommerce/woocommerce/pull/49472)
|
||||
* Fix - Correctly escape the HTML when linking customer orders. [#49195](https://github.com/woocommerce/woocommerce/pull/49195)
|
||||
* Fix - CSY - Fix intro banner copy for existing themes [#49787](https://github.com/woocommerce/woocommerce/pull/49787)
|
||||
* Fix - CYS - Fix marking the CYS task as completed only by accessing the Intro page. [#49374](https://github.com/woocommerce/woocommerce/pull/49374)
|
||||
* Fix - CYS - Remove the site title block length from the "Large Header" and the "Centered Menu Header". [#48671](https://github.com/woocommerce/woocommerce/pull/48671)
|
||||
* Fix - CYS: Disable readonly mode only when full composability feature flag is enabled. [#48752](https://github.com/woocommerce/woocommerce/pull/48752)
|
||||
* Fix - CYS: Ensure that the button in the Intro page redirects to the Customizer when a classic theme is enabled. [#49804](https://github.com/woocommerce/woocommerce/pull/49804)
|
||||
* Fix - CYS: fix: Assembler follows admin color schema. [#49159](https://github.com/woocommerce/woocommerce/pull/49159)
|
||||
* Fix - CYS: fix arrow welcome tour [#49607](https://github.com/woocommerce/woocommerce/pull/49607)
|
||||
* Fix - CYS: Fix border width pattern preview. [#49753](https://github.com/woocommerce/woocommerce/pull/49753)
|
||||
* Fix - CYS: Fix button background on Featured Category Cover image [#49659](https://github.com/woocommerce/woocommerce/pull/49659)
|
||||
* Fix - CYS: fix drag to resize bar [#49657](https://github.com/woocommerce/woocommerce/pull/49657)
|
||||
* Fix - CYS: fix flickering effect. [#48767](https://github.com/woocommerce/woocommerce/pull/48767)
|
||||
* Fix - CYS: fix logic to disable click on the no block placeholder [#48722](https://github.com/woocommerce/woocommerce/pull/48722)
|
||||
* Fix - CYS: Fix no block placeholder style. [#49673](https://github.com/woocommerce/woocommerce/pull/49673)
|
||||
* Fix - CYS: Fix pattern rendering issues [#49041](https://github.com/woocommerce/woocommerce/pull/49041)
|
||||
* Fix - CYS: fix pattern wrapped twice by group blocks [#48712](https://github.com/woocommerce/woocommerce/pull/48712)
|
||||
* Fix - CYS: fix selected header/footer pattern [#49788](https://github.com/woocommerce/woocommerce/pull/49788)
|
||||
* Fix - CYS: fix shuffle feature logic. [#49153](https://github.com/woocommerce/woocommerce/pull/49153)
|
||||
* Fix - CYS: fix the default intro pattern. [#49082](https://github.com/woocommerce/woocommerce/pull/49082)
|
||||
* Fix - CYS: Fix the tooltip overlap with the pattern. [#49700](https://github.com/woocommerce/woocommerce/pull/49700)
|
||||
* Fix - CYS: fix toolbar position after the site preview resizes [#49028](https://github.com/woocommerce/woocommerce/pull/49028)
|
||||
* Fix - CYS: hide button to resize the image [#48714](https://github.com/woocommerce/woocommerce/pull/48714)
|
||||
* Fix - CYS: Hide shuffle button when only one pattern is available [#49790](https://github.com/woocommerce/woocommerce/pull/49790)
|
||||
* Fix - CYS: not enable PTK features on WordPress 6.5. [#49591](https://github.com/woocommerce/woocommerce/pull/49591)
|
||||
* Fix - CYS: open Intro panel when user clicks on Design your homepage [#49005](https://github.com/woocommerce/woocommerce/pull/49005)
|
||||
* Fix - CYS: Remove not necessary placeholder on homepage sidebar. [#49705](https://github.com/woocommerce/woocommerce/pull/49705)
|
||||
* Fix - CYS: show default TT4 fonts pair. [#49675](https://github.com/woocommerce/woocommerce/pull/49675)
|
||||
* Fix - CYS: show logo when the header is updated. [#49681](https://github.com/woocommerce/woocommerce/pull/49681)
|
||||
* Fix - Display "View store" button text by default in the toolbar. [#48690](https://github.com/woocommerce/woocommerce/pull/48690)
|
||||
* Fix - Display admin notice of expired and expiring Woo subscription when the product
|
||||
is connected / activated on the site. [#49717](https://github.com/woocommerce/woocommerce/pull/49717)
|
||||
* Fix - Do not set the `tk_ai` tracking cookie if tracking is disabled. [#47863](https://github.com/woocommerce/woocommerce/pull/47863)
|
||||
* Fix - Ensure the second address line input appears when using autofill [#49730](https://github.com/woocommerce/woocommerce/pull/49730)
|
||||
* Fix - Ensure the Store API recalculates cart totals prior to running validation hooks. [#49455](https://github.com/woocommerce/woocommerce/pull/49455)
|
||||
* Fix - Exclude simple products from variations reports by default. [#49244](https://github.com/woocommerce/woocommerce/pull/49244)
|
||||
* Fix - Failure to fetch the country list no longer blocks users in the profiler. [#49519](https://github.com/woocommerce/woocommerce/pull/49519)
|
||||
* Fix - Fetch site cache status correctly if directly navigating to LYS Success page, and some refactoring [#48710](https://github.com/woocommerce/woocommerce/pull/48710)
|
||||
* Fix - Fix: Make woocommerce/product-price available in the Single Product template [#49906](https://github.com/woocommerce/woocommerce/pull/49906)
|
||||
* Fix - Fix a bug where woocommerce removes the current-menu-item class. [#45095](https://github.com/woocommerce/woocommerce/pull/45095)
|
||||
* Fix - Fix add product task to create template first and simplify logic [#49631](https://github.com/woocommerce/woocommerce/pull/49631)
|
||||
* Fix - Fix add zone button flinching and vertical centering [#48869](https://github.com/woocommerce/woocommerce/pull/48869)
|
||||
* Fix - Fix Analytics - Tax Report Pagination [#49562](https://github.com/woocommerce/woocommerce/pull/49562)
|
||||
* Fix - Fix confusing messages prompting switch to classic templates [#48717](https://github.com/woocommerce/woocommerce/pull/48717)
|
||||
* Fix - Fix default shipping selection when changing between pickup and shipping on block checkout. [#49718](https://github.com/woocommerce/woocommerce/pull/49718)
|
||||
* Fix - Fixed "woocommerce_new_order" triggering on checkout blocks page visit. [#47422](https://github.com/woocommerce/woocommerce/pull/47422)
|
||||
* Fix - Fixed a bug causing account email not to be taken in consideration for coupon validation when a customer has a different billing email set. [#48488](https://github.com/woocommerce/woocommerce/pull/48488)
|
||||
* Fix - Fixed a bug that would cause incorrect pricing at checkout for very large amounts. [#49361](https://github.com/woocommerce/woocommerce/pull/49361)
|
||||
* Fix - Fixed a bug where the close button is not visible on the mini cart when viewed on a mobile device [#48769](https://github.com/woocommerce/woocommerce/pull/48769)
|
||||
* Fix - Fixed horizontal and vertical layout overflows on LYS success page [#49127](https://github.com/woocommerce/woocommerce/pull/49127)
|
||||
* Fix - Fix fatal error in order reports when parent order doesn't exist [#49006](https://github.com/woocommerce/woocommerce/pull/49006)
|
||||
* Fix - Fix get_options deprecated notice when viewing Analytics > Orders [#49092](https://github.com/woocommerce/woocommerce/pull/49092)
|
||||
* Fix - Fix Order Count inconsistency between stats and reports [#49283](https://github.com/woocommerce/woocommerce/pull/49283)
|
||||
* Fix - Fix sidebar attribute control in Products by Attribute block [#49351](https://github.com/woocommerce/woocommerce/pull/49351)
|
||||
* Fix - Fix site coming soon page heading color [#49129](https://github.com/woocommerce/woocommerce/pull/49129)
|
||||
* Fix - Fix Task List - Reminder bar close button styling [#49532](https://github.com/woocommerce/woocommerce/pull/49532)
|
||||
* Fix - Fix the mini cart items not being visible when zoomed in [#48384](https://github.com/woocommerce/woocommerce/pull/48384)
|
||||
* Fix - Fix the namespace of the RestApiControllerBase class [#49333](https://github.com/woocommerce/woocommerce/pull/49333)
|
||||
* Fix - Fix the undefined array key "name" warning in ComingSoonRequestHandler.php when the font name is not set [#49795](https://github.com/woocommerce/woocommerce/pull/49795)
|
||||
* Fix - Fix variation name in analytics variations report [#49440](https://github.com/woocommerce/woocommerce/pull/49440)
|
||||
* Fix - Issue fixed where tags are overlapping divider line in "Filter by product category". [#48756](https://github.com/woocommerce/woocommerce/pull/48756)
|
||||
* Fix - Made coupon fields during block checkout stack on smaller screen sizes [#48623](https://github.com/woocommerce/woocommerce/pull/48623)
|
||||
* Fix - Make sure the correct block template file is used in the Site Editor for templates with fallback [#48621](https://github.com/woocommerce/woocommerce/pull/48621)
|
||||
* Fix - Make the edit/delete actions of shipping/products in manual orders accessible [#48238](https://github.com/woocommerce/woocommerce/pull/48238)
|
||||
* Fix - Make the Leaderboards on the Analytics > Dashboard page use consistent currency and number formatting across the page, and perceive the currency setting comes from the relevant filter. [#49097](https://github.com/woocommerce/woocommerce/pull/49097)
|
||||
* Fix - Narrowed scope of block theme notice templates so other template overrides are unaffected [#48686](https://github.com/woocommerce/woocommerce/pull/48686)
|
||||
* Fix - Prevent a warning showing when using the Shipping Address Calculator in combination with the additional checkout fields API [#49685](https://github.com/woocommerce/woocommerce/pull/49685)
|
||||
* Fix - Prevent download permissions metabox from being toggled when toggling individual permission details. [#49022](https://github.com/woocommerce/woocommerce/pull/49022)
|
||||
* Fix - Prevent possible type error in BatchProcessingController. [#49728](https://github.com/woocommerce/woocommerce/pull/49728)
|
||||
* Fix - Prevent product editor styles loading on non wc-admin pages [#49170](https://github.com/woocommerce/woocommerce/pull/49170)
|
||||
* Fix - Product Collection: allow custom collections to hide all of the filter controls, not only some of them [#49713](https://github.com/woocommerce/woocommerce/pull/49713)
|
||||
* Fix - Product Collection: Fix alignment of the first item in Grid layout for WP 6.6 [#49096](https://github.com/woocommerce/woocommerce/pull/49096)
|
||||
* Fix - Product Collection: Fix the Preview badge's corner radius [#48856](https://github.com/woocommerce/woocommerce/pull/48856)
|
||||
* Fix - Product Collection: Show "Sync with current query" option only in archive templates where it makes sense [#48917](https://github.com/woocommerce/woocommerce/pull/48917)
|
||||
* Fix - Product Fitlers: Bring back pattern [#49601](https://github.com/woocommerce/woocommerce/pull/49601)
|
||||
* Fix - Product rating - Inherit the color of the star when no ratings [#49678](https://github.com/woocommerce/woocommerce/pull/49678)
|
||||
* Fix - Provide more informative errors if a refund cannot be requested via the REST API, due to plugin conflicts. [#47918](https://github.com/woocommerce/woocommerce/pull/47918)
|
||||
* Fix - Redirect the lost password page to edit account while logged in. [#49670](https://github.com/woocommerce/woocommerce/pull/49670)
|
||||
* Fix - Removes several side effects in the code bases that caused translations to be loaded too early. [#47113](https://github.com/woocommerce/woocommerce/pull/47113)
|
||||
* Fix - Remove strong tags from patterns [#49901](https://github.com/woocommerce/woocommerce/pull/49901)
|
||||
* Fix - Replace the red CSS color with the $red SASS variable in WooCommerce legacy elements [#48742](https://github.com/woocommerce/woocommerce/pull/48742)
|
||||
* Fix - Resolved issues with new order hook triggers during transitions to and from draft statuses. [#49098](https://github.com/woocommerce/woocommerce/pull/49098)
|
||||
* Fix - Set coming soon preview body aspect ratio to 1/1 to fix broken template [#49749](https://github.com/woocommerce/woocommerce/pull/49749)
|
||||
* Fix - Show variations only for the selected product's variations [#49470](https://github.com/woocommerce/woocommerce/pull/49470)
|
||||
* Fix - Tooltips message is now selected based on the order status instead of the label of the order status, which would break if the current WordPress language was not English. Also passes the order object to the woocommerce_get_order_status_labels filter to allow for more personalized tooltips. [#49812](https://github.com/woocommerce/woocommerce/pull/49812)
|
||||
* Fix - Update allowed statuses in legacy payment handler for checkout block. [#48788](https://github.com/woocommerce/woocommerce/pull/48788)
|
||||
* Add - Use UTM parameters to link Tracks events from connect notice CTA and successful site connection [#50126](https://github.com/woocommerce/woocommerce/pull/50126)
|
||||
* Add - Add a generic function to determine remote logging eligibility [#49371](https://github.com/woocommerce/woocommerce/pull/49371)
|
||||
* Add - Add a rest api to manage the product custom fields [#48504](https://github.com/woocommerce/woocommerce/pull/48504)
|
||||
* Add - Add column `global_unique_id` to `wc_product_meta_lookup` table
|
||||
Add global_unique_id field to product and product variations [#49472](https://github.com/woocommerce/woocommerce/pull/49472)
|
||||
* Add - Added notice to the order confirmation page for new accounts instructing them to change the default password. [#48673](https://github.com/woocommerce/woocommerce/pull/48673)
|
||||
* Add - Add global unique ID field to the classic product editor [#49312](https://github.com/woocommerce/woocommerce/pull/49312)
|
||||
* Add - Add placeholder options and validation to checkout country and state select inputs. [#49616](https://github.com/woocommerce/woocommerce/pull/49616)
|
||||
* Add - Add Refresh Remote Inbox Notifications and Delete Remote Notification Tools [#48961](https://github.com/woocommerce/woocommerce/pull/48961)
|
||||
* Add - Add some robots.txt rules about directories created by WooCommerce [#49432](https://github.com/woocommerce/woocommerce/pull/49432)
|
||||
* Add - Adds product usage notice [#47697](https://github.com/woocommerce/woocommerce/pull/47697)
|
||||
* Add - Add support to run e2e tests against WPCOM website. [#49403](https://github.com/woocommerce/woocommerce/pull/49403)
|
||||
* Add - Add UTM parameters to missing payment method notice links. [#49621](https://github.com/woocommerce/woocommerce/pull/49621)
|
||||
* Add - Add validation for `__experimentalRegisterProductCollection` arguments [#48141](https://github.com/woocommerce/woocommerce/pull/48141)
|
||||
* Add - CYS: add badge that informs how many patterns have been inserted from each category. [#48668](https://github.com/woocommerce/woocommerce/pull/48668)
|
||||
* Add - CYS: Add default patterns. [#48839](https://github.com/woocommerce/woocommerce/pull/48839)
|
||||
* Add - CYS: Add Tracking for Fiverr Logo Maker CTA [#49783](https://github.com/woocommerce/woocommerce/pull/49783)
|
||||
* Add - CYS: Enable the PTK feature. [#49565](https://github.com/woocommerce/woocommerce/pull/49565)
|
||||
* Add - Expose __experimentalRegisterProductCollection in @woocommerce/blocks-registry Package [#48141](https://github.com/woocommerce/woocommerce/pull/48141)
|
||||
* Add - Improvements in the handling of feature compatibility for plugins [#48169](https://github.com/woocommerce/woocommerce/pull/48169)
|
||||
* Add - Product Collection: Rename "Sync with current query" option to "Use page context" and make it working in non-archive context as well [#49627](https://github.com/woocommerce/woocommerce/pull/49627)
|
||||
* Update - Add pattern validation for global_unique_id [#50501](https://github.com/woocommerce/woocommerce/pull/50501)
|
||||
* Update - Clear global_unique_id when restoring a product that doesn't have an unique id [#50496](https://github.com/woocommerce/woocommerce/pull/50496)
|
||||
* Update - Use admin password reset on admin login screen [#50200](https://github.com/woocommerce/woocommerce/pull/50200)
|
||||
* Update - Prevent creation of password-protected coupons. [#50236](https://github.com/woocommerce/woocommerce/pull/50236)
|
||||
* Update - Add a link to the Theming docs from the blockified templates README.md file [#48538](https://github.com/woocommerce/woocommerce/pull/48538)
|
||||
* Update - Add a new icon style to the "Customer Account" block. [#48979](https://github.com/woocommerce/woocommerce/pull/48979)
|
||||
* Update - Adds setting to control the visibility of product count in Mini cart block [#48545](https://github.com/woocommerce/woocommerce/pull/48545)
|
||||
* Update - Add tracking for enable auto renew links on notices [#49710](https://github.com/woocommerce/woocommerce/pull/49710)
|
||||
* Update - Add UTM parameters to subscription renewal notice links. [#49645](https://github.com/woocommerce/woocommerce/pull/49645)
|
||||
* Update - Adjust input field height and input label text size. [#49636](https://github.com/woocommerce/woocommerce/pull/49636)
|
||||
* Update - Adjust top margin of the coupon code in the Cart and Checkout blocks. [#49603](https://github.com/woocommerce/woocommerce/pull/49603)
|
||||
* Update - CYS - Add borders to footer and header patterns on the assembler. [#49299](https://github.com/woocommerce/woocommerce/pull/49299)
|
||||
* Update - CYS - Add missing patterns to their categories for the assembler [#49154](https://github.com/woocommerce/woocommerce/pull/49154)
|
||||
* Update - CYS - Add tracking events to pattern features. [#49556](https://github.com/woocommerce/woocommerce/pull/49556)
|
||||
* Update - CYS - Disable the Full Composability for CYS AI flows [#49290](https://github.com/woocommerce/woocommerce/pull/49290)
|
||||
* Update - CYS - Fetch patterns from the private dotcom patterns category instead of from the default source site. [#49007](https://github.com/woocommerce/woocommerce/pull/49007)
|
||||
* Update - CYS - Fetch patterns from the WooCommerce PTK source site. [#48492](https://github.com/woocommerce/woocommerce/pull/48492)
|
||||
* Update - CYS - Filter out patterns with external dependencies. [#48618](https://github.com/woocommerce/woocommerce/pull/48618)
|
||||
* Update - CYS - Fix CSS spacing issues in the assembler. [#49232](https://github.com/woocommerce/woocommerce/pull/49232)
|
||||
* Update - CYS - Fix dark patterns buttons color. [#49181](https://github.com/woocommerce/woocommerce/pull/49181)
|
||||
* Update - CYS - Fix the column spacing for the "Four Image Grid Content Left" pattern [#49669](https://github.com/woocommerce/woocommerce/pull/49669)
|
||||
* Update - CYS - Fix the font size of the "DON'T HAVE A LOGO YET?" title. [#49231](https://github.com/woocommerce/woocommerce/pull/49231)
|
||||
* Update - CYS - Fix the intro cards size to match the designs. [#49297](https://github.com/woocommerce/woocommerce/pull/49297)
|
||||
* Update - CYS - Fix the pattern preview border color on hover and for inserted patterns. [#49206](https://github.com/woocommerce/woocommerce/pull/49206)
|
||||
* Update - CYS - Improve margins for CYS core patterns. [#49196](https://github.com/woocommerce/woocommerce/pull/49196)
|
||||
* Update - CYS - Improve the designs of the Intro page bottom cards. [#48983](https://github.com/woocommerce/woocommerce/pull/48983)
|
||||
* Update - CYS - Include the dotcom patterns from the "Reviews" category. [#49140](https://github.com/woocommerce/woocommerce/pull/49140)
|
||||
* Update - CYS - Make some titles bold on CYS patterns. [#49151](https://github.com/woocommerce/woocommerce/pull/49151)
|
||||
* Update - CYS - Make the patterns content translatable for patterns in the dictionary. [#49633](https://github.com/woocommerce/woocommerce/pull/49633)
|
||||
* Update - CYS - Register PTK "Testimonials" patterns as "Reviews" [#48674](https://github.com/woocommerce/woocommerce/pull/48674)
|
||||
* Update - CYS - Remove non-default patterns and register them from the PTK. Update margins. [#49101](https://github.com/woocommerce/woocommerce/pull/49101)
|
||||
* Update - CYS - Schedule the `fetch_patterns` actions only once every hour. [#49754](https://github.com/woocommerce/woocommerce/pull/49754)
|
||||
* Update - CYS - Update pattern categories and its descriptions. [#48665](https://github.com/woocommerce/woocommerce/pull/48665)
|
||||
* Update - CYS - Update pattern toolbar delete button copy to `Delete`. [#49295](https://github.com/woocommerce/woocommerce/pull/49295)
|
||||
* Update - CYS - Update the full composability layout styles [#49303](https://github.com/woocommerce/woocommerce/pull/49303)
|
||||
* Update - CYS - Update the intro pages for different type of themes. [#49910](https://github.com/woocommerce/woocommerce/pull/49910)
|
||||
* Update - CYS: Add the proper tracking string to the external Fiverr link in sidebar of the **Add your logo** screen. [#49745](https://github.com/woocommerce/woocommerce/pull/49745)
|
||||
* Update - CYS: Add `rel="noreferrer"` to External Fiverr Link in sidebar of **Add your logo** screen. [#49314](https://github.com/woocommerce/woocommerce/pull/49314)
|
||||
* Update - CYS: Improve Block Toolbar logic. [#48799](https://github.com/woocommerce/woocommerce/pull/48799)
|
||||
* Update - CYS: improve copy no blocks placeholder. [#49030](https://github.com/woocommerce/woocommerce/pull/49030)
|
||||
* Update - CYS: Improve patterns order [#49204](https://github.com/woocommerce/woocommerce/pull/49204)
|
||||
* Update - CYS: no highlight the pattern when it is added. [#48802](https://github.com/woocommerce/woocommerce/pull/48802)
|
||||
* Update - CYS: Remove margin last pattern preview [#49767](https://github.com/woocommerce/woocommerce/pull/49767)
|
||||
* Update - CYS: Remove not necessary patterns. [#48750](https://github.com/woocommerce/woocommerce/pull/48750)
|
||||
* Update - CYS: Revisit sidebar layout. [#48803](https://github.com/woocommerce/woocommerce/pull/48803)
|
||||
* Update - CYS: Update Block Toolbar Position [#48662](https://github.com/woocommerce/woocommerce/pull/48662)
|
||||
* Update - CYS: Update icon used by the "Customer account" block into header patterns [#49133](https://github.com/woocommerce/woocommerce/pull/49133)
|
||||
* Update - CYS: Update sidebar homepage copy [#48882](https://github.com/woocommerce/woocommerce/pull/48882)
|
||||
* Update - CYS: Update verbiage in the CTA to our Fiverr Logo Maker landing page. [#48987](https://github.com/woocommerce/woocommerce/pull/48987)
|
||||
* Update - CYS: when the footer/header is clicked, the border color is blue. [#48765](https://github.com/woocommerce/woocommerce/pull/48765)
|
||||
* Update - Deprecate and create new coming soon block version [#49786](https://github.com/woocommerce/woocommerce/pull/49786)
|
||||
* Update - E2E: check the `Add` button when creating product variations in the new Product Editor [#48928](https://github.com/woocommerce/woocommerce/pull/48928)
|
||||
* Update - E2E: in the new Product Editor app, update how to detect when global attributes are loaded. [#48915](https://github.com/woocommerce/woocommerce/pull/48915)
|
||||
* Update - E2E: remove UI check when creating attribute global terms [#48934](https://github.com/woocommerce/woocommerce/pull/48934)
|
||||
* Update - Ensure expiration-related modal is shown to the installed Woo subscriptions [#49747](https://github.com/woocommerce/woocommerce/pull/49747)
|
||||
* Update - Ensures the product ID is valid when interacting with product variations via the REST API. [#48804](https://github.com/woocommerce/woocommerce/pull/48804)
|
||||
* Update - Ensure that active plugins shown in the System Status api endpoint actually exist [#48709](https://github.com/woocommerce/woocommerce/pull/48709)
|
||||
* Update - Ensuring product creation with unique sku for concurrent requests [#47476](https://github.com/woocommerce/woocommerce/pull/47476)
|
||||
* Update - Fix: Show preview label only when Product Collection block is selected [#48795](https://github.com/woocommerce/woocommerce/pull/48795)
|
||||
* Update - Fix Classic Template block registration on WP 6.6 [#48730](https://github.com/woocommerce/woocommerce/pull/48730)
|
||||
* Update - Fix typo on Congratulations screen [#49233](https://github.com/woocommerce/woocommerce/pull/49233)
|
||||
* Update - Hide account creation options not relevent to block checkout when using block checkout. [#49389](https://github.com/woocommerce/woocommerce/pull/49389)
|
||||
* Update - Improve rendering of order list table on mobile. [#49592](https://github.com/woocommerce/woocommerce/pull/49592)
|
||||
* Update - Improve the handling of the deprecated WC()->api property [#48884](https://github.com/woocommerce/woocommerce/pull/48884)
|
||||
* Update - Make proceed to order button non sticky when zoom level is bigger than 100% [#48391](https://github.com/woocommerce/woocommerce/pull/48391)
|
||||
* Update - Make Single Product gallery thumbnail images sharper by defining a srcset [#49112](https://github.com/woocommerce/woocommerce/pull/49112)
|
||||
* Update - Migrate the cart and checkout block's state, country and custom field input to a native select [#48180](https://github.com/woocommerce/woocommerce/pull/48180)
|
||||
* Update - Move remote logger to `./src` and improve `fetch_latest_woocommerce_version()` logic [#49639](https://github.com/woocommerce/woocommerce/pull/49639)
|
||||
* Update - Optimize the method that gets the downloads count for a given download [#49008](https://github.com/woocommerce/woocommerce/pull/49008)
|
||||
* Update - preparing checkout blocks docs for dev docs site [#49010](https://github.com/woocommerce/woocommerce/pull/49010)
|
||||
* Update - Product Collection: revert renaming "Sync with current query" option [#49907](https://github.com/woocommerce/woocommerce/pull/49907)
|
||||
* Update - Product Editor: improve E2E tests. Test the `+3 More` item label in the Organization tab [#48891](https://github.com/woocommerce/woocommerce/pull/48891)
|
||||
* Update - Product Editor: restore and fix E2E test that creates product variations [#48725](https://github.com/woocommerce/woocommerce/pull/48725)
|
||||
* Update - Product Editor: restore Product (local) Attributes E2E test [#48871](https://github.com/woocommerce/woocommerce/pull/48871)
|
||||
* Update - Product Editor: update create product variations E2E test [#48627](https://github.com/woocommerce/woocommerce/pull/48627)
|
||||
* Update - Redesigned the Product Collection block's insertion journey. [#48911](https://github.com/woocommerce/woocommerce/pull/48911)
|
||||
* Update - Remove Jetpack copy experiment from core profiler [#49452](https://github.com/woocommerce/woocommerce/pull/49452)
|
||||
* Update - Remove the hooked blocks feature gate and replace with wc_hooked_blocks_version option [#49302](https://github.com/woocommerce/woocommerce/pull/49302)
|
||||
* Update - Replace the "Customer account" line logo. [#49666](https://github.com/woocommerce/woocommerce/pull/49666)
|
||||
* Update - Return HTTP 404 for REST API requests involving non-existing tax class. [#48579](https://github.com/woocommerce/woocommerce/pull/48579)
|
||||
* Update - Return HTTP 404 when accessing non-existent webhooks via REST API. [#48729](https://github.com/woocommerce/woocommerce/pull/48729)
|
||||
* Update - Return HTTP 404 when trying to read or delete a non-existent product review. [#48726](https://github.com/woocommerce/woocommerce/pull/48726)
|
||||
* Update - Run full e2e tests suite against Pressable and WPCOM websites. [#49597](https://github.com/woocommerce/woocommerce/pull/49597)
|
||||
* Update - Update content for usage tracking modal for CYS experience [#49911](https://github.com/woocommerce/woocommerce/pull/49911)
|
||||
* Update - Updated account settings descriptions for added clarity [#48556](https://github.com/woocommerce/woocommerce/pull/48556)
|
||||
* Update - Update Jetpack's new SSO classes and methods to prevent deprecation notice. [#49752](https://github.com/woocommerce/woocommerce/pull/49752)
|
||||
* Update - Update required and tested up to WP versions for the WordPress 6.6 release. [#49619](https://github.com/woocommerce/woocommerce/pull/49619)
|
||||
* Update - Update Settings to disable Save button unless modifications are made. [#47444](https://github.com/woocommerce/woocommerce/pull/47444)
|
||||
* Update - Update shipping method setup modal copy if the block-based local pickup is enabled [#48529](https://github.com/woocommerce/woocommerce/pull/48529)
|
||||
* Update - Update Store Alert styles [#49174](https://github.com/woocommerce/woocommerce/pull/49174)
|
||||
* Update - Update Store Alert widths to match main body [#48487](https://github.com/woocommerce/woocommerce/pull/48487)
|
||||
* Update - Update the "Customer Account" block icon for the line style. [#49401](https://github.com/woocommerce/woocommerce/pull/49401)
|
||||
* Update - Update the CYS opt-in messaging [#49894](https://github.com/woocommerce/woocommerce/pull/49894)
|
||||
* Update - Update the footer section in "Add products" task [#49782](https://github.com/woocommerce/woocommerce/pull/49782)
|
||||
* Update - Update WC Tasks in the WC Home. Rename to WooCommerce marketplace, add new browse marketplace, remove connect to woocomerce.com from inbox [#48128](https://github.com/woocommerce/woocommerce/pull/48128)
|
||||
* Update - Utilize the new shared component to showcase WooPayments payment method logos. [#49300](https://github.com/woocommerce/woocommerce/pull/49300)
|
||||
* Dev - Add Allure to Blocks e2e tests [#49228](https://github.com/woocommerce/woocommerce/pull/49228)
|
||||
* Dev - Add daily checks for core e2e with PHP 8.1 and WP latest-1 [#48929](https://github.com/woocommerce/woocommerce/pull/48929)
|
||||
* Dev - Add hook to customize the rendered receipt template [#48872](https://github.com/woocommerce/woocommerce/pull/48872)
|
||||
* Dev - Add new CI workflow to trigger tests on demand. [#49674](https://github.com/woocommerce/woocommerce/pull/49674)
|
||||
* Dev - Add support for e2e testing against external sites in CI [#49017](https://github.com/woocommerce/woocommerce/pull/49017)
|
||||
* Dev - Another attempt to stabilize flaky Product Collection E2E tests. [#49638](https://github.com/woocommerce/woocommerce/pull/49638)
|
||||
* Dev - Blocks E2E: Fix a flaky Product Collection test where accidental multiple edits occur and break the template saving step. [#49590](https://github.com/woocommerce/woocommerce/pull/49590)
|
||||
* Dev - Blocks E2E: Fix DB snapshot removal step in setup script. [#49677](https://github.com/woocommerce/woocommerce/pull/49677)
|
||||
* Dev - Build: speedup dependencies installation by disabling composer optimize autoloading by default. [#48980](https://github.com/woocommerce/woocommerce/pull/48980)
|
||||
* Dev - CI: buffix for linting missing strict types directive. [#49015](https://github.com/woocommerce/woocommerce/pull/49015)
|
||||
* Dev - CI: cleanup CI related command after fixing jobs matrix generation. [#49330](https://github.com/woocommerce/woocommerce/pull/49330)
|
||||
* Dev - CI: code style fixes to pass linting in updated CI environment. [#49020](https://github.com/woocommerce/woocommerce/pull/49020)
|
||||
* Dev - CI: improve flacky tests reporting job execution time. [#49665](https://github.com/woocommerce/woocommerce/pull/49665)
|
||||
* Dev - CI: Re-group PHPUnit jobs. [#49443](https://github.com/woocommerce/woocommerce/pull/49443)
|
||||
* Dev - CI: reduce running time for PHPUnit related jobs. [#49193](https://github.com/woocommerce/woocommerce/pull/49193)
|
||||
* Dev - CI: tuning deps caching for playwright. [#49081](https://github.com/woocommerce/woocommerce/pull/49081)
|
||||
* Dev - CI config: update changes lists to include wp-env config [#49626](https://github.com/woocommerce/woocommerce/pull/49626)
|
||||
* Dev - Clean up unused files in plugins/woocommerce-blocks [#49319](https://github.com/woocommerce/woocommerce/pull/49319)
|
||||
* Dev - Create a separate JS cart and checkout JavaScript bundle to improve performance. [#48010](https://github.com/woocommerce/woocommerce/pull/48010)
|
||||
* Dev - CYS - Fix the "test_fetch_patterns_should_register_testimonials_category_as_reviews" tests. [#48719](https://github.com/woocommerce/woocommerce/pull/48719)
|
||||
* Dev - Dropping select2 and point it to SelectWoo [#48731](https://github.com/woocommerce/woocommerce/pull/48731)
|
||||
* Dev - E2E: enable slow tests reporting for blocks E2E tests. [#49367](https://github.com/woocommerce/woocommerce/pull/49367)
|
||||
* Dev - E2E tests: fix basic spec for multiple environments [#49609](https://github.com/woocommerce/woocommerce/pull/49609)
|
||||
* Dev - E2E tests: fix failing settings-tax e2e test [#48792](https://github.com/woocommerce/woocommerce/pull/48792)
|
||||
* Dev - E2E tests: Fix flaky account email receiving test [#48957](https://github.com/woocommerce/woocommerce/pull/48957)
|
||||
* Dev - E2E tests: Fix flaky connect to Woo.com test [#48926](https://github.com/woocommerce/woocommerce/pull/48926)
|
||||
* Dev - E2E tests: Fix flaky filling regular price in the inventory tab [#49226](https://github.com/woocommerce/woocommerce/pull/49226)
|
||||
* Dev - E2E tests: Fix flaky filling SKU field and CYS footer [#49191](https://github.com/woocommerce/woocommerce/pull/49191)
|
||||
* Dev - E2E tests: Fix flaky Gutenberg, WC Services tests [#48916](https://github.com/woocommerce/woocommerce/pull/48916)
|
||||
* Dev - E2E tests: Fix flaky Gutenberg tests [#48896](https://github.com/woocommerce/woocommerce/pull/48896)
|
||||
* Dev - E2E tests: Fix flaky Gutenberg tests [#49548](https://github.com/woocommerce/woocommerce/pull/49548)
|
||||
* Dev - E2E tests: Fix flaky logo picker waiting for response tests [#49451](https://github.com/woocommerce/woocommerce/pull/49451)
|
||||
* Dev - E2E tests: Fix flaky merchant filling sku field in the new editor [#49134](https://github.com/woocommerce/woocommerce/pull/49134)
|
||||
* Dev - E2E tests: Fix flaky merchant tests [#49381](https://github.com/woocommerce/woocommerce/pull/49381)
|
||||
* Dev - E2E tests: Fix merchant settings general test [#48907](https://github.com/woocommerce/woocommerce/pull/48907)
|
||||
* Dev - E2E tests: fix shopper checkout block test [#49596](https://github.com/woocommerce/woocommerce/pull/49596)
|
||||
* Dev - E2E tests: fix some tests for WP 6.6 [#49634](https://github.com/woocommerce/woocommerce/pull/49634)
|
||||
* Dev - E2E tests: tag different envs in e2e test suite to run in workflows [#48715](https://github.com/woocommerce/woocommerce/pull/48715)
|
||||
* Dev - Final sanity check to make sure attributes are done saving [#48737](https://github.com/woocommerce/woocommerce/pull/48737)
|
||||
* Dev - Fix broken syntax in e2e-guidelines.md. [#49018](https://github.com/woocommerce/woocommerce/pull/49018)
|
||||
* Dev - Fix flaky orphaned refund test [#49741](https://github.com/woocommerce/woocommerce/pull/49741)
|
||||
* Dev - Hide product filters overlay template part experimental feature from public release [#49564](https://github.com/woocommerce/woocommerce/pull/49564)
|
||||
* Dev - In blocks codebase, export SITE_CURRENCY property with properties matching typescript definitions. [#48727](https://github.com/woocommerce/woocommerce/pull/48727)
|
||||
* Dev - Lint new PHP files for strict types directive [#48943](https://github.com/woocommerce/woocommerce/pull/48943)
|
||||
* Dev - Minor tooling tweaks (zip compression level, composer invocation) [#48857](https://github.com/woocommerce/woocommerce/pull/48857)
|
||||
* Dev - Monorepo: enable Jest and babel-loader caching. [#49656](https://github.com/woocommerce/woocommerce/pull/49656)
|
||||
* Dev - Monorepo: fix side-effects of setting strict mode for linting script. [#49436](https://github.com/woocommerce/woocommerce/pull/49436)
|
||||
* Dev - Monorepo: minor tweaks in zip building script (use frozen lock file when installing dependecies). [#49640](https://github.com/woocommerce/woocommerce/pull/49640)
|
||||
* Dev - Monorepo: refine approach to patching dependecies in favour of built-in pnpm functionality. [#49892](https://github.com/woocommerce/woocommerce/pull/49892)
|
||||
* Dev - Monorepo: set strict mode for linting script. [#49366](https://github.com/woocommerce/woocommerce/pull/49366)
|
||||
* Dev - Monorepo: tweak patching dependencies for better Webpack perfromance. [#49703](https://github.com/woocommerce/woocommerce/pull/49703)
|
||||
* Dev - Move buildkite-test-collector to devDependencies [#49051](https://github.com/woocommerce/woocommerce/pull/49051)
|
||||
* Dev - move docs out of main folder until subcategories are ready [#49354](https://github.com/woocommerce/woocommerce/pull/49354)
|
||||
* Dev - Product Collection: add tracking for block usage [#46466](https://github.com/woocommerce/woocommerce/pull/46466)
|
||||
* Dev - Remove performance tests from PR checks (leave on push to trunk) [#48927](https://github.com/woocommerce/woocommerce/pull/48927)
|
||||
* Dev - Switch `render()` to `createRoot().render()` to use React 18 features. [#48858](https://github.com/woocommerce/woocommerce/pull/48858)
|
||||
* Dev - Tests: pin wp-env core version to 6.5 (temporary until tests are fixed to pass with 6.6) [#49620](https://github.com/woocommerce/woocommerce/pull/49620)
|
||||
* Dev - Tweaks related to caching Composer dependecies and Playwright downloads in CI. [#48865](https://github.com/woocommerce/woocommerce/pull/48865)
|
||||
* Dev - Update Action Scheduler to 3.8.1 [#49483](https://github.com/woocommerce/woocommerce/pull/49483)
|
||||
* Dev - Update a few e2e tests failing on the daily run [#49313](https://github.com/woocommerce/woocommerce/pull/49313)
|
||||
* Dev - Update all values to be random so that retries don't fail on assertions [#48734](https://github.com/woocommerce/woocommerce/pull/48734)
|
||||
* Dev - Updated CodeSniffer configuration to address conflicting rules. [#49183](https://github.com/woocommerce/woocommerce/pull/49183)
|
||||
* Dev - Update Playwright from 1.44 to 1.45 [#49202](https://github.com/woocommerce/woocommerce/pull/49202)
|
||||
* Tweak - Add admin_install_timestamp in WC_Tracker [#50076](https://github.com/woocommerce/woocommerce/pull/50076)
|
||||
* Tweak - Add $wpdb->esc_like to the search criteria when searching for a product custom field name [#48949](https://github.com/woocommerce/woocommerce/pull/48949)
|
||||
* Tweak - Add the initially installed WooCommerce version to the wp_options table [#49139](https://github.com/woocommerce/woocommerce/pull/49139)
|
||||
* Tweak - Change CLIRunner namespace for better PSR compatibility. [#49390](https://github.com/woocommerce/woocommerce/pull/49390)
|
||||
* Tweak - Equalize data in Order export with data in Client side CSV export [#49356](https://github.com/woocommerce/woocommerce/pull/49356)
|
||||
* Tweak - Exclude coming soon patterns from block inserter [#48821](https://github.com/woocommerce/woocommerce/pull/48821)
|
||||
* Tweak - Fix tip block syntax in register-product-collection.md [#49785](https://github.com/woocommerce/woocommerce/pull/49785)
|
||||
* Tweak - Get tax line label instead of name in StoreAPI Order endpoint. [#48445](https://github.com/woocommerce/woocommerce/pull/48445)
|
||||
* Tweak - Improve checks when offering to remove test orders [#49032](https://github.com/woocommerce/woocommerce/pull/49032)
|
||||
* Tweak - Initialize BlockTemplatesController for block themes only. [#48905](https://github.com/woocommerce/woocommerce/pull/48905)
|
||||
* Tweak - Product Collection: flatten telemetry query filters data to json string [#49680](https://github.com/woocommerce/woocommerce/pull/49680)
|
||||
* Tweak - Remove enctype from verify email form [#48859](https://github.com/woocommerce/woocommerce/pull/48859)
|
||||
* Tweak - Remove unneeded IE styling as IE is no longer supported [#49027](https://github.com/woocommerce/woocommerce/pull/49027)
|
||||
* Tweak - Rename Google Listings and Ads with Google for WooCommerce [#47614](https://github.com/woocommerce/woocommerce/pull/47614)
|
||||
* Tweak - Show Guest when there is no Customer name [#49594](https://github.com/woocommerce/woocommerce/pull/49594)
|
||||
* Tweak - Trigger doing_it_wrong() when using HPOS query args for CPT order queries. [#47457](https://github.com/woocommerce/woocommerce/pull/47457)
|
||||
* Tweak - Update text to Content right with image left pattern [#49792](https://github.com/woocommerce/woocommerce/pull/49792)
|
||||
* Tweak - Update the "API enabled" entry in the System Status Report to clarify that it pertains to the Legacy REST API. [#48878](https://github.com/woocommerce/woocommerce/pull/48878)
|
||||
* Tweak - Add placeholder options and validation to all checkout select inputs. [#49929](https://github.com/woocommerce/woocommerce/pull/49929)
|
||||
* Performance - Load REST API namespaces only when needed. [#47704](https://github.com/woocommerce/woocommerce/pull/47704)
|
||||
* Performance - Reduced number of recalculations on Store API cart routes [#48944](https://github.com/woocommerce/woocommerce/pull/48944)
|
||||
* Enhancement - Add address title to edit/add buttons on My Account page [#49171](https://github.com/woocommerce/woocommerce/pull/49171)
|
||||
* Enhancement - Added password field to block checkout (when enabled in settings) for new accounts to set a custom password. [#48985](https://github.com/woocommerce/woocommerce/pull/48985)
|
||||
* Enhancement - Add required indication to login forms [#48743](https://github.com/woocommerce/woocommerce/pull/48743)
|
||||
* Enhancement - Add scope attributes to the order table on My Account [#49201](https://github.com/woocommerce/woocommerce/pull/49201)
|
||||
* Enhancement - Add strength meter to block checkout password field. [#49164](https://github.com/woocommerce/woocommerce/pull/49164)
|
||||
* Enhancement - Allow blocks with parents in the "woocommerce" namespace to be added to the Checkout block without requiring them to be added to the "__experimental_woocommerce_blocks_add_data_attributes_to_block" hook. [#48543](https://github.com/woocommerce/woocommerce/pull/48543)
|
||||
* Enhancement - Convert edit address link to a button on checkout [#49471](https://github.com/woocommerce/woocommerce/pull/49471)
|
||||
* Enhancement - CYS: make the entire shuffle section clickable. [#48889](https://github.com/woocommerce/woocommerce/pull/48889)
|
||||
* Enhancement - CYS: Remove iframe animation [#48941](https://github.com/woocommerce/woocommerce/pull/48941)
|
||||
* Enhancement - Made the "return to cart" link (in the checkout block) hidden by default. [#48762](https://github.com/woocommerce/woocommerce/pull/48762)
|
||||
* Enhancement - Provide the location context within the Product Collection block context [#44145](https://github.com/woocommerce/woocommerce/pull/44145)
|
||||
* Enhancement - Updated block checkout and Store API stock handling so stock is only reserved when attempting payment for an order. [#49446](https://github.com/woocommerce/woocommerce/pull/49446)
|
||||
|
||||
= 9.1.4 2024-07-26 =
|
||||
|
||||
**WooCommerce**
|
||||
|
@ -8,7 +339,6 @@
|
|||
* Fix - Hardening against XSS via the Product Button unescaped attribute. [#50010](https://github.com/woocommerce/woocommerce/pull/50010)
|
||||
* Fix - Enhance escaping for block attributes. [#50015](https://github.com/woocommerce/woocommerce/pull/50015)
|
||||
|
||||
|
||||
= 9.1.2 2024-07-12 =
|
||||
|
||||
**WooCommerce**
|
||||
|
@ -5901,12 +6231,12 @@
|
|||
* Dev - Revert work done in #4857 for automated shipping after OBW is completed #5971
|
||||
* Add - Welcome modal when coming from Calypso #6004
|
||||
* Enhancement - Add an a/b experiment for installing free business features #5786
|
||||
* Dev - Add `onChangeCallback` feature to the wc-admin `<Form>` component #5786
|
||||
* Dev - Add `onChangeCallback` feature to the wc-admin `<Form>` component #5786
|
||||
* Fix - Generate JSON translation chunks on plugin activation #6028
|
||||
* Dev - Add merchant email notifications #5922
|
||||
* Dev - Add merchant email notifications #5922
|
||||
* Add - Email note to add first product. #6024
|
||||
* Add - Note for users coming from Calypso. #6030
|
||||
* Enhancement - Add an "unread" indicator to inbox messages. #6047
|
||||
* Enhancement - Add an "unread" indicator to inbox messages. #6047
|
||||
* Add - Manage activity from home screen inbox message. #6072
|
||||
|
||||
= 4.9.5 2022-03-10 =
|
||||
|
@ -6709,7 +7039,7 @@
|
|||
* Fix - The WCPay method not appearing as recommended sometimes #4345
|
||||
* Fix - Removed URLSearchParams method #4501
|
||||
* Fix - REST API collections schema. #4484
|
||||
* Fix - null issue in wpNavMenuClassChange #4513 🎉 gradosevic
|
||||
* Fix - null issue in wpNavMenuClassChange #4513 🎉 gradosevic
|
||||
* Fix - RTL stylesheet loading for split code chunks. #4542
|
||||
* Fix - Don't show store location step in tax and shipping tasks if the address has already been provided #4507
|
||||
* Fix - Check for enabled methods before payment task completion #4530
|
||||
|
@ -6851,7 +7181,7 @@
|
|||
* Dev - Fixed failing unit tests. #105
|
||||
|
||||
**WooCommerce Admin 1.2.3**
|
||||
* Enhancement - Add onboarding payments note #4157
|
||||
* Enhancement - Add onboarding payments note #4157
|
||||
* Enhancement - Marketing Inbox Note #4030
|
||||
* Performance - Use Route based code splitting to reduce bundle size #4094
|
||||
* Performance - trim down inbox note API request. #3977
|
||||
|
@ -7262,7 +7592,7 @@
|
|||
* Dev - Add a filter `woocommerce_ajax_add_order_item_validation` to allow validations in `add_order_item` function. #24518
|
||||
* Dev - Use `wc_get_cart_url` instead of `wc_get_page_permalink( 'cart' )` because former has a filter `woocommerce_get_cart_url` to allow customization. #24530
|
||||
* Dev - New `woocommerce_product_after_tabs` action hook added. #24694
|
||||
* Dev - Enable append hashes on custom events (like ajax requests) #24665
|
||||
* Dev - Enable append hashes on custom events (like ajax requests) #24665
|
||||
* Dev - Introduced `woocommerce_order_get_formatted_billing_address` and `woocommerce_order_get_formatted_shipping_address` filters. #24677
|
||||
* Dev - WC_Abstract_Order::recalculate_coupons() is public now. #24740
|
||||
* Dev - Added 'applied_coupon' trigger to checkout.js. #24406
|
||||
|
@ -7375,7 +7705,7 @@
|
|||
* Tweak - Update the generate username setting description label to reflect how the username is actually generated. #23911
|
||||
* Tweak - OBW: Adjust plugin highlight container sizes to avoid overlap. #23997
|
||||
* Tweak - Round tax amounts late when the round at subtotal level setting is enabled to reduce rounding errors. #24024
|
||||
* Tweak - OBW: Now includes WooCommerce Admin as a recommended plugin. #24058
|
||||
* Tweak - OBW: Now includes WooCommerce Admin as a recommended plugin. #24058
|
||||
* Template - Review and update all template files escaping. #23460
|
||||
* Template - Remove mention of shipping section from the checkout/form-login.php template as shipping is not always a requirement for an order. #23941
|
||||
* Template - Add new filter `woocommerce_before_thankyou` to the checkout/thankyou.php template. #23538
|
||||
|
@ -8047,7 +8377,7 @@
|
|||
* Fix - Fix warning when using logger instance in woocommerce_logging_class filter. #21448
|
||||
* Fix - Use uppercase "ID" when sorting product queries by ID. #21461
|
||||
* Fix - Consistently escape the gateway ID in the checkout payment method template. #21439
|
||||
* Fix - Avoid treating HTTP 301 and 302 codes as failures for webhooks. #21491
|
||||
* Fix - Avoid treating HTTP 301 and 302 codes as failures for webhooks. #21491
|
||||
* Fix - Add address_1 to shipping packages info in WC_Cart:: get_shipping_packages to make it work correctly in address formatting functions. #21493
|
||||
* Fix - Don't fire two of the same action when saving shipping settings. #21494
|
||||
* Fix - Remove double condition for address line 2 in `WC_Countries::get_default_address_fields`. #20629
|
||||
|
@ -8359,7 +8689,7 @@
|
|||
* Fix - Delete orphaned variations after product import. #19378
|
||||
* Fix - Ensure API credentials exist before defining PayPal refund support. #19380
|
||||
* Fix - Force word-wrapping in the log viewer to prevent layout-breaking long lines. #19503
|
||||
* Fix - Removes permission checks that were preventing webhooks from displaying properly when no post object existed. #19508
|
||||
* Fix - Removes permission checks that were preventing webhooks from displaying properly when no post object existed. #19508
|
||||
* Fix - Empty cart after completing PayPal payment. #19509
|
||||
* Fix - Strip tags on aria-labels in Add to Cart template to prevent broken HTML. #19522
|
||||
* Fix - Update post_modified date when saving products and variations but no other product data. #19595
|
||||
|
@ -8381,7 +8711,7 @@
|
|||
* Fix - WC API should not try to create a product image when creating a product variation if an empty image is passed. #19971
|
||||
* Fix - Force settings API settings to autoload by default. #19998
|
||||
* Fix - Cart html5 validation events when using keyboard. #20001
|
||||
* Fix - Don't show stock status fields in external product quick-edit. #20005
|
||||
* Fix - Don't show stock status fields in external product quick-edit. #20005
|
||||
* Fix - Prevent an infinite loop if 2 grouped products are linked. #20020
|
||||
* Fix - Switch stock_status when manage stock gets changed to prevent being out of stock if stock quantity is > 0. #20021
|
||||
* Fix - When duplicating variation, set the date to null. #20083
|
||||
|
@ -8643,7 +8973,7 @@
|
|||
* Fix - is_visible should ensure product is is not trashed before returning true.
|
||||
* Fix - Return packages with no rates back to the cart so the shipping calculator is displayed even when the current country is not shippable.
|
||||
* Fix - Merge session and persistent carts when both exists after login.
|
||||
* Fix - Remove "wc_error" query string after login.
|
||||
* Fix - Remove "wc_error" query string after login.
|
||||
* Fix - Allow woocommerce_form_field() have 'custom_attributes' equal 0.
|
||||
* Fix - Bulk actions in status logs table.
|
||||
* Fix - Exclude add-to-cart from pagination links.
|
||||
|
@ -8684,19 +9014,19 @@
|
|||
* Fix - Removed class within class in admin meta boxes HTML.
|
||||
* Fix - Fixed wrong `flex-control-nav` selector scope in `add-to-cart-variation.js`
|
||||
* Fix - Allow variations to be added to cart from query string.
|
||||
* Fix - Use `add_filter` for `comment_feed_where` hook.
|
||||
* Fix - Use `add_filter` for `comment_feed_where` hook.
|
||||
* Fix - Change nocache_headers hook firing in the cache helper.
|
||||
* Fix - Coupon min/max spend based on displayed subtotal.
|
||||
* Fix - Fix event propagation on click in setup wizard and improve validation.
|
||||
* Fix - API - Change how line items are saved in API so calculations are correct.
|
||||
* Tweak - Hide downloads from admin emails.
|
||||
* Tweak - Hide downloads from admin emails.
|
||||
* Tweak - Set placeholder for variation lxwxh field to that of the parent.
|
||||
* Tweak - Improve the Add Payment Methods display so buttons are not shown when no payment methods support the feature.
|
||||
* Localization - Update NJ tax rate.
|
||||
* Localization - Add Belarusian ruble BYN.
|
||||
|
||||
= 3.2.3 - 2017-11-02 =
|
||||
* Fix - Fixed a conflict with some slider plugins due to sanitization of archive/term descriptions.
|
||||
* Fix - Fixed a conflict with some slider plugins due to sanitization of archive/term descriptions.
|
||||
* Fix - Fixed a flexslider bug when there is only 1 image on the product page (no gallery).
|
||||
* Fix - Prevent potential notices when someone extends product tabs wrongly.
|
||||
* Fix - Fixed display of shipping calculator under some conditions.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
category_title: Block Theme Development
|
||||
category_slug: block-theme-development
|
||||
post_title: Block theme development
|
||||
---
|
|
@ -1,13 +1,12 @@
|
|||
# Cart and Checkout Blocks Theming <!-- omit in toc -->
|
||||
---
|
||||
post_title: Cart and checkout blocks theming
|
||||
menu_title: Cart and Checkout Blocks Theming
|
||||
tags: reference
|
||||
---
|
||||
|
||||
> [!IMPORTANT]
|
||||
> We strongly discourage writing CSS code based on existing block class names and prioritize using global styles when possible. We especially discourage writing CSS selectors that rely on a specific block being a descendant of another one, as users can move blocks around freely, so they are prone to breaking. Similar to WordPress itself, we consider the HTML structure within components, blocks, and block templates to be “private”, and subject to further change in the future, so using CSS to target the internals of a block or a block template is _not recommended or supported_.
|
||||
> We strongly discourage writing CSS code based on existing block class names and prioritize using global styles when possible. We especially discourage writing CSS selectors that rely on a specific block being a descendant of another one, as users can move blocks around freely, so they are prone to breaking. Similar to WordPress itself, we consider the HTML structure within components, blocks, and block templates to be "private", and subject to further change in the future, so using CSS to target the internals of a block or a block template is _not recommended or supported_.
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
|
||||
- [Buttons](#buttons)
|
||||
- [Mobile submit container](#mobile-submit-container)
|
||||
- [Item quantity badge](#item-quantity-badge)
|
||||
|
||||
## Buttons
|
||||
|
||||
|
@ -81,13 +80,5 @@ By default, it uses a combination of black and white borders and shadows so it h
|
|||
|
||||
![Order summary screenshot with custom styles for the item quantity badge](https://user-images.githubusercontent.com/3616980/83863109-2e421c80-a723-11ea-9bf7-2033a96cf5b2.png)
|
||||
|
||||
<!-- FEEDBACK -->
|
||||
|
||||
---
|
||||
|
||||
[We're hiring!](https://woocommerce.com/careers/) Come work with us!
|
||||
|
||||
🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/designers/theming/cart-and-checkout.md)
|
||||
|
||||
<!-- /FEEDBACK -->
|
||||
|
|
@ -1,11 +1,15 @@
|
|||
# CSS Styling
|
||||
---
|
||||
post_title: CSS styling for themes
|
||||
menu_title: CSS Styling for Themes
|
||||
tags: reference
|
||||
---
|
||||
|
||||
## Block and component class names
|
||||
|
||||
> [!IMPORTANT]
|
||||
> We strongly discourage writing CSS code based on existing block class names and prioritize using global styles when possible. We especially discourage writing CSS selectors that rely on a specific block being a descendant of another one, as users can move blocks around freely, so they are prone to breaking. Similar to WordPress itself, we consider the HTML structure within components, blocks, and block templates to be “private”, and subject to further change in the future, so using CSS to target the internals of a block or a block template is _not recommended or supported_.
|
||||
> We strongly discourage writing CSS code based on existing block class names and prioritize using global styles when possible. We especially discourage writing CSS selectors that rely on a specific block being a descendant of another one, as users can move blocks around freely, so they are prone to breaking. Similar to WordPress itself, we consider the HTML structure within components, blocks, and block templates to be "private", and subject to further change in the future, so using CSS to target the internals of a block or a block template is _not recommended or supported_.
|
||||
|
||||
WooCommerce Blocks follows BEM for class names, as [stated in our coding guidelines](../../contributors/coding-guidelines.md). All classes start with one of these two prefixes:
|
||||
WooCommerce Blocks follows BEM for class names, as [stated in our coding guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/docs/contributors/coding-guidelines.md). All classes start with one of these two prefixes:
|
||||
|
||||
* `.wc-block-`: class names specific to a single block.
|
||||
* `.wc-block-components-`: class names specific to a component. The component might be reused by different blocks.
|
||||
|
@ -38,10 +42,10 @@ Those classes are:
|
|||
|
||||
Container width | Class name
|
||||
----------------|------------
|
||||
\>700px | `is-large`
|
||||
\>700px | `is-large`
|
||||
521px-700px | `is-medium`
|
||||
401px-520px | `is-small`
|
||||
<=400px | `is-mobile`
|
||||
<=400px | `is-mobile`
|
||||
|
||||
As an example, if we wanted to do the Checkout font size 10% larger when the container has a width of 521px or wider, we could do so with this code:
|
||||
|
||||
|
@ -54,9 +58,9 @@ As an example, if we wanted to do the Checkout font size 10% larger when the con
|
|||
|
||||
## WC Blocks _vs._ theme style conflicts for semantic elements
|
||||
|
||||
WooCommerce Blocks uses HTML elements according to their semantic meaning, not their default layout. That means that some times blocks might use an anchor link (`<a>`) but display it as a button. Or the other way around, a `<button>` might be displayed as a text link. Similarly, headings might be displayed as regular text.
|
||||
WooCommerce Blocks uses HTML elements according to their semantic meaning, not their default layout. That means that some times blocks might use an anchor link (`<a>`) but display it as a button. Or the other way around, a `<button>` might be displayed as a text link. Similarly, headings might be displayed as regular text.
|
||||
|
||||
In these cases, Blocks include some CSS resets to undo most default styles introduced by themes. A `<button>` that is displayed as a text link will probably have resets for the background, border, etc. That will solve most conflicts out-of-the-box but in some occasions those CSS resets might not have effect if the theme has a specific CSS selector with higher specificity. When that happens, we really encourage theme developers to decrease their selectors specificity so Blocks styles have preference, if that's not possible, themes can write CSS resets on top.
|
||||
In these cases, Blocks include some CSS resets to undo most default styles introduced by themes. A `<button>` that is displayed as a text link will probably have resets for the background, border, etc. That will solve most conflicts out-of-the-box but in some occasions those CSS resets might not have effect if the theme has a specific CSS selector with higher specificity. When that happens, we really encourage theme developers to decrease their selectors specificity so Blocks styles have preference, if that's not possible, themes can write CSS resets on top.
|
||||
|
||||
## Hidden elements
|
||||
|
||||
|
@ -66,15 +70,3 @@ WC Blocks use the [`hidden` HTML attribute](https://developer.mozilla.org/en-US/
|
|||
|
||||
WooCommerce Blocks avoids using legacy unprefixed classes as much as possible. However, you might find some of them that have been added for backwards compatibility. We still encourage themes to use the prefixed classes when possible, this avoids conflicts with other plugins, the editor, etc.
|
||||
|
||||
## Blocks
|
||||
|
||||
* [Filter blocks](filter-blocks.md)
|
||||
* [Cart and Checkout](cart-and-checkout.md)
|
||||
|
||||
## Other docs
|
||||
|
||||
* [Product grid blocks style update in 2.7.0](product-grid-270.md)
|
||||
* [Class names update in 2.8.0](class-names-update-280.md)
|
||||
* [Class names update in 3.3.0](class-names-update-330.md)
|
||||
* [Class names update in 3.4.0](class-names-update-340.md)
|
||||
* [Class names update in 4.6.0](class-names-update-460.md)
|
|
@ -1,16 +1,17 @@
|
|||
# Theming
|
||||
---
|
||||
post_title: Theming for Woo blocks
|
||||
menu_title: Theming for Woo Blocks
|
||||
tags: reference
|
||||
---
|
||||
|
||||
This page includes documentation about theming WooCommerce blocks and block themes.
|
||||
|
||||
---
|
||||
|
||||
**Note:** this document assumes some previous knowledge about block theme development and some WordPress concepts. If you are completely new to block theme development, please check [Develop Your First Low-Code Block Theme](https://learn.wordpress.org/course/develop-your-first-low-code-block-theme/)
|
||||
to learn about block theme development, and explore
|
||||
the [Create Block Theme plugin](https://wordpress.org/plugins/create-block-theme/) tool when you're ready to create a
|
||||
new theme.
|
||||
|
||||
---
|
||||
|
||||
## General concepts
|
||||
|
||||
### Block templates
|
||||
|
@ -81,19 +82,4 @@ Before
|
|||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
<img src="https://github.com/woocommerce/woocommerce/assets/3616980/fbc11b83-f47b-4b25-bdeb-df798b251cce" width="210" alt="Product Collection block showing the Product Price block with default styles" /> | <img src="https://github.com/woocommerce/woocommerce/assets/3616980/c9730445-b9df-4e96-8204-a10896ac2c5a" width="210" alt="Product Collection block showing the Product Price styled with background and text colors and italic and bold typography" /> <!-- markdownlint-disable-line no-inline-html -->
|
||||
|
||||
You can find more [documentation on global styles](https://developer.wordpress.org/themes/global-settings-and-styles/styles/) in developer.wordpress.org. You can also find the [list of WooCommerce blocks and their names in the docs](../../block-references/block-references.md).
|
||||
|
||||
## Other docs
|
||||
|
||||
- [CSS styling](css-styling.md)
|
||||
|
||||
<!-- FEEDBACK -->
|
||||
|
||||
---
|
||||
|
||||
[We're hiring!](https://woocommerce.com/careers/) Come work with us!
|
||||
|
||||
🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/designers/theming/README.md)
|
||||
|
||||
<!-- /FEEDBACK -->
|
||||
|
||||
You can find more [documentation on global styles](https://developer.wordpress.org/themes/global-settings-and-styles/styles/) in developer.wordpress.org. You can also find the [list of WooCommerce blocks and their names in the docs](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/docs/block-references/block-references.md).
|
|
@ -85,7 +85,7 @@ return (pass);
|
|||
}
|
||||
# Block access to php admin pages via website
|
||||
if (req.url ~ "^/phpmyadmin/.*$" || req.url ~ "^/phppgadmin/.*$" || req.url ~ "^/server-status.*$") {
|
||||
error 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname";
|
||||
error 403 "For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname";
|
||||
}
|
||||
|
||||
Add this to vcl_fetch:
|
||||
|
|
|
@ -24,7 +24,7 @@ This filter is called once for each inner block area, so it is possible to be ve
|
|||
- _extensions_ `object` (default: `{}`) - The extensions object.
|
||||
- _args_ `object` - The arguments object with the following key:
|
||||
- _block_ `string` - The block name of the inner block area, e.g. `woocommerce/checkout-shipping-address-block`.
|
||||
- _validation_ `boolean` or `Error` - Checks if the returned value is an arry of strings. If an error occurs, it will be thrown.
|
||||
- _validation_ `boolean` or `Error` - Checks if the returned value is an array of strings. If an error occurs, it will be thrown.
|
||||
|
||||
### Returns <!-- omit in toc -->
|
||||
|
||||
|
|
|
@ -139,24 +139,23 @@ The options you feed the configuration instance are the same as those for expres
|
|||
|
||||
A big part of the payment method integration is the interface that is exposed for payment methods to use via props when the node provided is cloned and rendered on block mount. While all the props are listed below, you can find more details about what the props reference, their types etc via the [typedefs described in this file](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/assets/js/types/type-defs/payment-method-interface.ts).
|
||||
|
||||
| Property | Type | Description | Values |
|
||||
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `activePaymentMethod` | String | The slug of the current active payment method in the checkout. | - |
|
||||
| `billing` | Object | Contains everything related to billing. | `billingAddress`, `cartTotal`, `currency`, `cartTotalItems`, `displayPricesIncludingTax`, `appliedCoupons`, `customerId` |
|
||||
| `cartData` | Object | Data exposed from the cart including items, fees, and any registered extension data. Note that this data should be treated as immutable (should not be modified/mutated) or it will result in errors in your application. | `cartItems`, `cartFees`, `extensions` |
|
||||
| `checkoutStatus` | Object | The current checkout status exposed as various boolean state. | `isCalculating`, `isComplete`, `isIdle`, `isProcessing` |
|
||||
| Property | Type | Description | Values |
|
||||
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `activePaymentMethod` | String | The slug of the current active payment method in the checkout. | - |
|
||||
| `billing` | Object | Contains everything related to billing. | `billingAddress`, `cartTotal`, `currency`, `cartTotalItems`, `displayPricesIncludingTax`, `appliedCoupons`, `customerId` |
|
||||
| `cartData` | Object | Data exposed from the cart including items, fees, and any registered extension data. Note that this data should be treated as immutable (should not be modified/mutated) or it will result in errors in your application. | `cartItems`, `cartFees`, `extensions` |
|
||||
| `checkoutStatus` | Object | The current checkout status exposed as various boolean state. | `isCalculating`, `isComplete`, `isIdle`, `isProcessing` |
|
||||
| `components` | Object | It exposes React components that can be implemented by your payment method for various common interface elements used by payment methods. | <!-- markdownlint-disable-line no-inline-html --><ul><li>`ValidationInputError`: a container for holding validation errors which typically you'll include after any inputs.</li><li>[`PaymentMethodLabel`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/e089ae17043fa525e8397d605f0f470959f2ae95/assets/js/payment-method-extensions/payment-methods/paypal/index.js#L37-L40): use this component for the payment method label, including an optional icon.</li><li>`PaymentMethodIcons`: a React component used for displaying payment method icons.</li><li>- `LoadingMask`: a wrapper component that handles displaying a loading state when the isLoading prop is true. Exposes the [LoadingMask component](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/c9074a4941919987dbad16a80f358b960336a09d/assets/js/base/components/loading-mask/index.js)</li></ul> |
|
||||
| `emitResponse` | Object | Contains some constants that can be helpful when using the event emitter. Read the _[Emitting Events](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/e267cd96a4329a4eeef816b2ef627e113ebb72a5/docs/extensibility/checkout-flow-and-events.md#emitting-events)_ section for more details. | <!-- markdownlint-disable-line no-inline-html --><ul><li>`noticeContexts`: This is an object containing properties referencing areas where notices can be targeted in the checkout. The object has the following properties: <ul><li>`PAYMENTS`: This is a reference to the notice area in the payment methods step.</li><li>`EXPRESS_PAYMENTS`: This is a reference to the notice area in the express payment methods step.</li></ul></li><li>`responseTypes`: This is an object containing properties referencing the various response types that can be returned by observers for some event emitters. It makes it easier for autocompleting the types and avoiding typos due to human error. The types are `SUCCESS`, `FAIL`, `ERROR`. The values for these types also correspond to the [payment status types](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/34e17c3622637dbe8b02fac47b5c9b9ebf9e3596/src/Payments/PaymentResult.php#L21) from the [checkout endpoint response from the server](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/34e17c3622637dbe8b02fac47b5c9b9ebf9e3596/src/RestApi/StoreApi/Schemas/CheckoutSchema.php#L103-L113).</li></ul> |
|
||||
| `eventRegistration` | object | Contains all the checkout event emitter registration functions. These are functions the payment method can register observers on to interact with various points in the checkout flow (see [this doc](./checkout-flow-and-events.md) for more info). | `onCheckoutValidation`, `onCheckoutSuccess`, `onCheckoutFail`, `onPaymentSetup`, `onShippingRateSuccess`, `onShippingRateFail`, `onShippingRateSelectSuccess`, `onShippingRateSelectFail` |
|
||||
| `onClick` | Function | **Provided to express payment methods** that should be triggered when the payment method button is clicked (which will signal to checkout the payment method has taken over payment processing) | - |
|
||||
| `onClose` | Function | **Provided to express payment methods** that should be triggered when the express payment method modal closes and control is returned to checkout. | - |
|
||||
| `onSubmit` | Function | Submits the checkout and begins processing | - |
|
||||
| `buttonAttributes` | Object | Styles set by the merchant that should be respected by all express payment buttons | `height, borderRadius, darkMode` |
|
||||
| `paymentStatus` | Object | Various payment status helpers. Note, your payment method does not have to handle setting this status client side. Checkout will handle this via the responses your payment method gives from observers registered to [checkout event emitters](./checkout-flow-and-events.md). | `isPristine`, `isStarted`, `isProcessing`, `isFinished`, `hasError`, `hasFailed`, `isSuccessful`(see below for explanation) |
|
||||
| `setExpressPaymentError` | Function | Receives a string and allows express payment methods to set an error notice for the express payment area on demand. This can be necessary because some express payment method processing might happen outside of checkout events. | - |
|
||||
| `shippingData` | Object | Contains all shipping related data (outside of the shipping status). | `shippingRates`, `shippingRatesLoading`, `selectedRates`, `setSelectedRates`, `isSelectingRate`, `shippingAddress`, `setShippingAddress`, and `needsShipping` |
|
||||
| `eventRegistration` | object | Contains all the checkout event emitter registration functions. These are functions the payment method can register observers on to interact with various points in the checkout flow (see [this doc](./checkout-flow-and-events.md) for more info). | `onCheckoutValidation`, `onCheckoutSuccess`, `onCheckoutFail`, `onPaymentSetup`, `onShippingRateSuccess`, `onShippingRateFail`, `onShippingRateSelectSuccess`, `onShippingRateSelectFail` |
|
||||
| `onClick` | Function | **Provided to express payment methods** that should be triggered when the payment method button is clicked (which will signal to checkout the payment method has taken over payment processing) | - |
|
||||
| `onClose` | Function | **Provided to express payment methods** that should be triggered when the express payment method modal closes and control is returned to checkout. | - |
|
||||
| `onSubmit` | Function | Submits the checkout and begins processing | - |
|
||||
| `paymentStatus` | Object | Various payment status helpers. Note, your payment method does not have to handle setting this status client side. Checkout will handle this via the responses your payment method gives from observers registered to [checkout event emitters](./checkout-flow-and-events.md). | `isPristine`, `isStarted`, `isProcessing`, `isFinished`, `hasError`, `hasFailed`, `isSuccessful` (see below for explanation) |
|
||||
| `setExpressPaymentError` | Function | Receives a string and allows express payment methods to set an error notice for the express payment area on demand. This can be necessary because some express payment method processing might happen outside of checkout events. | - |
|
||||
| `shippingData` | Object | Contains all shipping related data (outside of the shipping status). | `shippingRates`, `shippingRatesLoading`, `selectedRates`, `setSelectedRates`, `isSelectingRate`, `shippingAddress`, `setShippingAddress`, and `needsShipping` |
|
||||
| `shippingStatus` | Object | Various shipping status helpers. | <!-- markdownlint-disable-line no-inline-html --><ul><li>`shippingErrorStatus`: an object with various error statuses that might exist for shipping</li><li>`shippingErrorTypes`: an object containing all the possible types for shipping error status</li></ul> |
|
||||
| `shouldSavePayment` | Boolean | Indicates whether or not the shopper has selected to save their payment method details (for payment methods that support saved payments). True if selected, false otherwise. Defaults to false. | - |
|
||||
| `shouldSavePayment` | Boolean | Indicates whether or not the shopper has selected to save their payment method details (for payment methods that support saved payments). True if selected, false otherwise. Defaults to false. | - |
|
||||
|
||||
- `isPristine`: This is true when the current payment status is `PRISTINE`.
|
||||
- `isStarted`: This is true when the current payment status is `EXPRESS_STARTED`.
|
||||
|
@ -168,33 +167,6 @@ A big part of the payment method integration is the interface that is exposed fo
|
|||
|
||||
Any registered `savedTokenComponent` node will also receive a `token` prop which includes the id for the selected saved token in case your payment method needs to use it for some internal logic. However, keep in mind, this is just the id representing this token in the database (and the value of the radio input the shopper checked), not the actual customer payment token (since processing using that usually happens on the server for security).
|
||||
|
||||
### Button Attributes for Express Payment Methods
|
||||
|
||||
This API provides a way to synchronise the look and feel of the express payment buttons for a coherent shopper experience. Express Payment Methods must prefer the values provided in the `buttonAttributes`, and use it's own configuration settings as backup when the buttons are rendered somewhere other than the Cart or Checkout block.
|
||||
|
||||
For example, in your button component, you would do something like this:
|
||||
|
||||
```js
|
||||
// Get your extension specific settings and set defaults if not available
|
||||
let {
|
||||
theme = 'dark',
|
||||
borderRadius = '4',
|
||||
height = '48',
|
||||
} = getButtonSettingsFromConfig();
|
||||
|
||||
// In a cart & checkout block context, we receive `buttonAttributes` as a prop which overwrite the extension specific settings
|
||||
if ( typeof buttonAttributes !== 'undefined' ) {
|
||||
height = buttonAttributes.height;
|
||||
borderRadius = buttonAttributes.borderRadius;
|
||||
theme = buttonAttributes.darkMode ? 'light' : 'dark';
|
||||
}
|
||||
...
|
||||
|
||||
return <button style={height: `${height}px`, borderRadius: `${borderRadius}px`} data-theme={theme} />
|
||||
```
|
||||
|
||||
Note the `height` and `borderRadius` properties should always be respected. The `darkMode` is an optional property that may be used by an extension as a clue to help identify what colour button would be best rendered, given the user's theme.
|
||||
|
||||
## Server Side Integration
|
||||
|
||||
### Processing Payment
|
||||
|
|
|
@ -5,8 +5,6 @@ tags: payment-methods
|
|||
current wccom url: https://woocommerce.com/document/check-if-payment-gateway-supports-refunds-subscriptions-preorders/
|
||||
---
|
||||
|
||||
# Check if a Payment Method Support Refunds, Subscriptions or Pre-orders
|
||||
|
||||
If a payment method's documentation doesn’t clearly outline the supported features, you can often find what features are supported by looking at payment methods code.
|
||||
|
||||
Payment methods can add support for certain features from WooCommerce and its extensions. For example, a payment method can support refunds, subscriptions or pre-orders functionality.
|
||||
|
@ -41,4 +39,4 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
|
|||
);
|
||||
```
|
||||
|
||||
If you don’t find `$this->supports` in the plugin files, that may mean that the payment method isn’t correctly declaring support for refunds, subscripts or pre-orders.
|
||||
If you don't find `$this->supports` in the plugin files, that may mean that the payment method isn't correctly declaring support for refunds, subscripts or pre-orders.
|
||||
|
|
|
@ -5,15 +5,11 @@ tags: code-snippet, tax
|
|||
current wccom url: https://woocommerce.com/document/setting-up-taxes-in-woocommerce/configuring-specific-tax-setups-in-woocommerce/#configuring-special-tax-setups
|
||||
---
|
||||
|
||||
# Code snippets for configuring special tax scenarios
|
||||
|
||||
## Scenario A: Charge the same price regardless of location and taxes
|
||||
|
||||
Scenario A: Charge the same price regardless of location and taxes
|
||||
|
||||
If a store enters product prices including taxes, but levies various location-based tax rates, the prices will appear to change depending on which tax rate is applied. In reality, the base price remains the same, but the taxes influence the total. [Follow this link for a detailed explanation](https://woocommerce.com/document/how-taxes-work-in-woocommerce/#cross-border-taxes).
|
||||
|
||||
Some merchants prefer to dynamically change product base prices to account for the changes in taxes and so keep the total price consistent regardless of tax rate. Enable that functionality by adding the following snippet to your child theme’s functions.php file or via a code snippet plugin.
|
||||
Some merchants prefer to dynamically change product base prices to account for the changes in taxes and so keep the total price consistent regardless of tax rate. Enable that functionality by adding the following snippet to your child theme's functions.php file or via a code snippet plugin.
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
@ -23,7 +19,7 @@ add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );
|
|||
|
||||
## Scenario B: Charge tax based on the subtotal amount
|
||||
|
||||
The following snippet is useful in case where a store only ads taxes when the subtotal reaches a specified minimum. In the code snippet below that minimum is 110 of the store’s currency. Adjust the snippet according to your requirements.
|
||||
The following snippet is useful in case where a store only ads taxes when the subtotal reaches a specified minimum. In the code snippet below that minimum is 110 of the store's currency. Adjust the snippet according to your requirements.
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
@ -42,7 +38,7 @@ function big_apple_get_tax_class( $tax_class, $product ) {
|
|||
|
||||
Some merchants may require different tax rates to be applied based on a customer role to accommodate for wholesale status or tax exemption.
|
||||
|
||||
To enable this functionality, add the following snippet to your child theme’s functions.php file or via a code snippet plugin. In this snippet, users with “administrator” capabilities will be assigned the **Zero rate tax class**. Adjust it according to your requirements.
|
||||
To enable this functionality, add the following snippet to your child theme's functions.php file or via a code snippet plugin. In this snippet, users with “administrator” capabilities will be assigned the **Zero rate tax class**. Adjust it according to your requirements.
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
@ -62,7 +58,7 @@ add_filter( 'woocommerce_product_variation_get_tax_class', 'wc_diff_rate_for_use
|
|||
|
||||
## Scenario D: Show 0 value taxes
|
||||
|
||||
Taxes that have 0-value are hidden by default. To show them regardless, add the following snippet to your theme’s functions.php file or via a code snippet plugins:
|
||||
Taxes that have 0-value are hidden by default. To show them regardless, add the following snippet to your theme's functions.php file or via a code snippet plugins:
|
||||
|
||||
```php
|
||||
add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );
|
||||
|
@ -70,7 +66,7 @@ add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );
|
|||
|
||||
## Scenario E: Suffixes on the main variable product
|
||||
|
||||
One of the tax settings for WooCommerce enables the use of suffixes to add additional information to product prices. It’s available for use with the variations of a variable product, but is disabled at the main variation level as it can impact website performance when there are many variations.
|
||||
One of the tax settings for WooCommerce enables the use of suffixes to add additional information to product prices. It's available for use with the variations of a variable product, but is disabled at the main variation level as it can impact website performance when there are many variations.
|
||||
|
||||
The method responsible for the related price output can be customized via filter hooks if needed for variable products. This will require customization that can be implemented via this filter:
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 189 KiB |
|
@ -4,10 +4,13 @@ menu_title: Disabling marketplace suggestions
|
|||
current wccom url: https://woocommerce.com/document/woocommerce-marketplace-suggestions-settings/#section-6
|
||||
---
|
||||
|
||||
## Disabling Marketplace Suggestions Programmatically
|
||||
|
||||
For those who prefer to programmatically disable marketplace suggestions that are fetched from woocommerce.com, add the `woocommerce_allow_marketplace_suggestions` filter to your theme’s `functions.php` or a custom plugin.
|
||||
|
||||
For example:
|
||||
|
||||
```php
|
||||
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' );
|
||||
```
|
||||
|
||||
This filter will completely remove Marketplace Suggestions from your WooCommerce admin.
|
||||
|
|
|
@ -18,7 +18,7 @@ The functionality to hide all other methods, and only show Free Shipping, requir
|
|||
|
||||
Before adding snippets, clear your WooCommerce cache. Go to WooCommerce > System Status > Tools > WooCommerce Transients > Clear transients.
|
||||
|
||||
Add this code to your child theme’s `functions.php`, or via a plugin that allows custom functions to be added. Please don’t add custom code directly to a parent theme’s `functions.php` as changes are entirely erased when a parent theme updates.
|
||||
Add this code to your child theme's `functions.php`, or via a plugin that allows custom functions to be added. Please don't add custom code directly to a parent theme's `functions.php` as changes are entirely erased when a parent theme updates.
|
||||
|
||||
## Code Snippets
|
||||
|
||||
|
@ -34,7 +34,7 @@ This means you can use `add_filter()` on `woocommerce_shipping_free_shipping_is_
|
|||
|
||||
### How do I only show Free Shipping?
|
||||
|
||||
The following snippet hides everything but `free_shipping`, if it’s available and the customer's cart qualifies.
|
||||
The following snippet hides everything but `free_shipping`, if it's available and the customer's cart qualifies.
|
||||
|
||||
```php
|
||||
/**
|
||||
|
@ -59,7 +59,7 @@ add_filter( 'woocommerce_package_rates', 'my_hide_shipping_when_free_is_availabl
|
|||
|
||||
### How do I only show Local Pickup and Free Shipping?
|
||||
|
||||
The snippet below hides everything but `free_shipping` and `local_pickup`, if it’s available and the customer's cart qualifies.
|
||||
The snippet below hides everything but `free_shipping` and `local_pickup`, if it's available and the customer's cart qualifies.
|
||||
|
||||
```php
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
---
|
||||
post_title: Legacy Local Pickup Advanced Settings and Customization
|
||||
post_title: Advanced settings and customization for legacy Local Pickup
|
||||
tags: code-snippet
|
||||
current wccom url: https://woocommerce.com/document/local-pickup/#advanced-settings-customization
|
||||
note: Docs links out to Skyverge's site for howto add a custom email - do we have our own alternative?
|
||||
---
|
||||
|
||||
# Advanced settings and customization for legacy Local Pickup
|
||||
|
||||
## Disable local taxes when using local pickup
|
||||
|
||||
Local Pickup calculates taxes based on your store’s location (address) by default, and not the customer’s address. Add this snippet at the end of your theme's `functions.php` to use your standard tax configuration instead:
|
||||
Local Pickup calculates taxes based on your store's location (address) by default, and not the customer's address. Add this snippet at the end of your theme's `functions.php` to use your standard tax configuration instead:
|
||||
|
||||
```php
|
||||
add_filter( 'woocommerce_apply_base_tax_for_local_pickup', '__return_false' );
|
||||
|
@ -19,7 +17,7 @@ Regular taxes is then used when local pickup is selected, instead of store-locat
|
|||
|
||||
## Changing the location for local taxes
|
||||
|
||||
To charge local taxes based on the postcode and city of the local pickup location, you need to define the shop’s base city and post code using this example code:
|
||||
To charge local taxes based on the postcode and city of the local pickup location, you need to define the shop's base city and post code using this example code:
|
||||
|
||||
```php
|
||||
add_filter( 'woocommerce_countries_base_postcode', create_function( '', 'return "80903";' ) );
|
||||
|
@ -33,5 +31,5 @@ Update `80903` to reflect your preferred postcode/zip, and `COLORADO SPRINGS` wi
|
|||
_Shipping Address_ is not displayed on the admin order emails when Local Pickup is used as the shipping method.
|
||||
|
||||
Since all core shipping options use the standard order flow, customers receive the same order confirmation email whether they select local pickup or any other shipping option.
|
||||
Use this guide to create custom emails for local pickup if you’d like to send a separate email for local pickup orders: [How to Add a Custom WooCommerce Email](https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/).
|
||||
Use this guide to create custom emails for local pickup if you'd like to send a separate email for local pickup orders: [How to Add a Custom WooCommerce Email](https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/).
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ tags: code-snippet
|
|||
current wccom url: https://woocommerce.com/document/woocommerce-localization/#making-your-translation-upgrade-safe
|
||||
---
|
||||
|
||||
# Making your translation upgrade safe
|
||||
|
||||
Like all other plugins, WooCommerce keeps translations in `wp-content/languages/plugins`.
|
||||
|
||||
However, if you want to include a custom translation, you can add them to `wp-content/languages/woocommerce`, or you can use a snippet to load a custom translation stored elsewhere:
|
||||
|
|
|
@ -9,7 +9,7 @@ current wccom url: https://woocommerce.com/document/ssl-and-https/#websites-behi
|
|||
|
||||
WooCommerce uses the `is_ssl()` WordPress function to verify if your website using SSL or not.
|
||||
|
||||
`is_ssl()` checks if the connection is via HTTPS or on Port 443. However, this won’t work for websites behind load balancers, especially websites hosted at Network Solutions. For details, read [WordPress is_ssl() function reference notes](https://codex.wordpress.org/Function_Reference/is_ssl#Notes).
|
||||
`is_ssl()` checks if the connection is via HTTPS or on Port 443. However, this won't work for websites behind load balancers, especially websites hosted at Network Solutions. For details, read [WordPress is_ssl() function reference notes](https://codex.wordpress.org/Function_Reference/is_ssl#Notes).
|
||||
|
||||
Websites behind load balancers or reverse proxies that support `HTTP_X_FORWARDED_PROTO` can be fixed by adding the following code to the `wp-config.php` file, above the require_once call:
|
||||
|
||||
|
|
|
@ -5,20 +5,18 @@ tags: code-snippet
|
|||
current wccom url: https://woocommerce.com/document/installing-uninstalling-woocommerce/#uninstalling-woocommerce
|
||||
---
|
||||
|
||||
# Uninstall and remove all WooCommerce Data
|
||||
|
||||
The WooCommerce plugin can be uninstalled like any other WordPress plugin. By default, the WooCommerce data is left in place though.
|
||||
|
||||
If you need to remove *all* WooCommerce data as well, including products, order data, coupons, etc., you need to to modify the site’s `wp-config.php` *before* deactivating and deleting the WooCommerce plugin.
|
||||
If you need to remove *all* WooCommerce data as well, including products, order data, coupons, etc., you need to to modify the site's `wp-config.php` *before* deactivating and deleting the WooCommerce plugin.
|
||||
|
||||
As this action is destructive and permanent, the information is provided as is. WooCommerce Support cannot help with this process or anything that happens as a result.
|
||||
|
||||
To fully remove all WooCommerce data from your WordPress site, open `wp-config.php`, scroll down to the bottom of the file, and add the following constant on its own line above `/* That’s all, stop editing. */`.
|
||||
To fully remove all WooCommerce data from your WordPress site, open `wp-config.php`, scroll down to the bottom of the file, and add the following constant on its own line above `/* That's all, stop editing. */`.
|
||||
|
||||
```php
|
||||
define( 'WC_REMOVE_ALL_DATA', true );
|
||||
|
||||
/* That’s all, stop editing! Happy publishing. */
|
||||
/* That's all, stop editing! Happy publishing. */
|
||||
```
|
||||
|
||||
Then, once the changes are saved to the file, when you deactivate and delete WooCommerce, all of its data is removed from your WordPress site database.
|
||||
|
|
|
@ -5,8 +5,6 @@ tags: code-snippet
|
|||
current wccom url: https://woocommerce.com/document/digital-downloadable-product-handling/#protecting-your-uploads-directory
|
||||
---
|
||||
|
||||
## Using NGINX server to protect your upload directory
|
||||
|
||||
If you using NGINX server for your site along with **X-Accel-Redirect/X-Sendfile** or **Force Downloads** download method, it is necessary that you add this configuration for better security:
|
||||
|
||||
```php
|
||||
|
|
|
@ -15,7 +15,7 @@ Inside each subfolder you'll find various markdown files. When imported into the
|
|||
|
||||
## Getting Setup
|
||||
|
||||
> This guide presumes that you're familar with basic Git and GitHub functionality, that you're signed into a GitHub account, and that you have Git setup locally. If you're new to GitHub, we recommend reading their [quickstart](https://docs.github.com/en/get-started/quickstart/hello-world) and [working with forks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) guides before getting started.
|
||||
> This guide presumes that you're familiar with basic Git and GitHub functionality, that you're signed into a GitHub account, and that you have Git setup locally. If you're new to GitHub, we recommend reading their [quickstart](https://docs.github.com/en/get-started/quickstart/hello-world) and [working with forks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) guides before getting started.
|
||||
|
||||
### Initial Setup
|
||||
|
||||
|
@ -33,7 +33,7 @@ Inside each subfolder you'll find various markdown files. When imported into the
|
|||
6. [Open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) that merges your branch with the WooCommerce monorepo's trunk branch.
|
||||
* To do this, when creating the pull request, set the `base repository` to `woocommerce/woocommerce`, the `base` to `trunk`, the `head repository` to `yourgithubusername/woocommerce` and the `compare` to the branch you created (eg: `docs/improve-extension-performance`).
|
||||
* When creating the pull request, set a descriptive title. Additionally, ensure you fill out the template provided in the description. For purely docs changes, your testing instructions should reference any major changes you think should be checked.
|
||||
7. The WooCommerce Developer Advocacy team will review your pull request and provide feedback via the comments as neccesary. Once the content is ready, we'll merge it into `trunk` and it'll appear on the Woo Developer Docs site!
|
||||
7. The WooCommerce Developer Advocacy team will review your pull request and provide feedback via the comments as necessary. Once the content is ready, we'll merge it into `trunk` and it'll appear on the Woo Developer Docs site!
|
||||
|
||||
## Creating New Pages
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ The WooCommerce core plugin code can be found in our [monorepo](https://github.c
|
|||
|
||||
### Code of Conduct
|
||||
|
||||
Contributing to an open source project requires cooperation amongst individuals and organziations all working to make our project a stable and safe place to build and ask questions. Please thoroughly read our [Code of Conduct](https://github.com/woocommerce/woocommerce/blob/trunk/SECURITY.md) to get familiar with our standards and processes.
|
||||
Contributing to an open source project requires cooperation amongst individuals and organizations all working to make our project a stable and safe place to build and ask questions. Please thoroughly read our [Code of Conduct](https://github.com/woocommerce/woocommerce/blob/trunk/SECURITY.md) to get familiar with our standards and processes.
|
||||
|
||||
### Contributor Guidelines
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@ post_title: Extensibility in blocks
|
|||
|
||||
These documents are all dealing with extensibility in the various WooCommerce Blocks.
|
||||
|
||||
## Imports and dependency extration
|
||||
## Imports and dependency extraction
|
||||
|
||||
The documentation in this section will use window globals in code examples, for example:
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ function sync_coming_soon_to_other_plugins( $old_value, $new_value, $option ) {
|
|||
|
||||
#### Trigger from other plugins
|
||||
|
||||
You can use the following example to enable or disable WooCommerce coming soon mode from another plugin by directy updating `woocommerce_coming_soon` option:
|
||||
You can use the following example to enable or disable WooCommerce coming soon mode from another plugin by directly updating `woocommerce_coming_soon` option:
|
||||
|
||||
```php
|
||||
function sync_coming_soon_from_other_plugins( $is_enabled ) {
|
||||
|
|
|
@ -137,4 +137,4 @@ Now with synchronization fully disabled, test out various critical flows, check
|
|||
3. [ ] Regularly communicate with stakeholders regarding testing progress and outcomes.
|
||||
4. [ ] Plan for potential fallback scenarios, ensuring the ability to revert to posts if issues arise.
|
||||
|
||||
Did you follow this guide? Drop us a comment below to let us know how it went. Still have more questions? Reach to us on our dedicated HPOS upgrade channel in the Community Slack: [#hpos-upgrade-party](https://woocommercecommunity.slack.com/archives/C043X91E72M). If you are not yet a member of the Woo Slack Communtiy, you can join [here](https://woocommerce.com/community-slack/).
|
||||
Did you follow this guide? Drop us a comment below to let us know how it went. Still have more questions? Reach to us on our dedicated HPOS upgrade channel in the Community Slack: [#hpos-upgrade-party](https://woocommercecommunity.slack.com/archives/C043X91E72M). If you are not yet a member of the Woo Slack Community, you can join [here](https://woocommerce.com/community-slack/).
|
||||
|
|
|
@ -20,7 +20,7 @@ add_action(
|
|||
$basic_details->add_block(
|
||||
[
|
||||
'id' => 'example-tutorial-animal-age',
|
||||
// This orders the field, core fields are seperated by sums of 10.
|
||||
// This orders the field, core fields are separated by sums of 10.
|
||||
'order' => 40,
|
||||
'blockName' => 'woocommerce/product-number-field',
|
||||
'attributes' => [
|
||||
|
|
|
@ -56,7 +56,7 @@ These flows will continually evolve as the platform evolves with flows updated,
|
|||
| Shopper | Product | Variable Product info updates depending on variation | shopper/product-variable.spec.js |
|
||||
| Shopper | Product | Add Variable Product to Cart | shopper/product-variable.spec.js |
|
||||
| Shopper | Product | Display up-sell product | products/product-linked-products.spec.js |
|
||||
| Shopper | Product | Display releated products | products/product-linked-products.spec.js |
|
||||
| Shopper | Product | Display related products | products/product-linked-products.spec.js |
|
||||
| Shopper | Product | Display reviews | merchant/product-reviews.spec.js |
|
||||
| Shopper | Product | Add review | merchant/product-reviews.spec.js |
|
||||
| Shopper | Product | View product images | shopper/product-simple.spec.js |
|
||||
|
@ -74,7 +74,7 @@ These flows will continually evolve as the platform evolves with flows updated,
|
|||
| Shopper | Cart | Display shipping options by address | shopper/calculate-shipping.spec.js |
|
||||
| Shopper | Cart | View empty cart | shopper/cart.spec.js |
|
||||
| Shopper | Cart | Display correct tax | shopper/cart-checkout-calculate-tax.spec.js |
|
||||
| Shopper | Cart | Respect coupon usage contraints | shopper/cart-checkout-coupons.spec.js |
|
||||
| Shopper | Cart | Respect coupon usage constraints | shopper/cart-checkout-coupons.spec.js |
|
||||
| Shopper | Cart | Display cross-sell products | products/product-linked-products.spec.js |
|
||||
| Shopper | Cart | Proceed to checkout | shopper/checkout.spec.js |
|
||||
|
||||
|
@ -92,7 +92,7 @@ These flows will continually evolve as the platform evolves with flows updated,
|
|||
| Shopper | Checkout | View checkout | shopper/checkout.spec.js |
|
||||
| Shopper | Checkout | Receive warnings when form is incomplete | shopper/checkout.spec.js |
|
||||
| Shopper | Checkout | Add billing address | shopper/checkout.spec.js |
|
||||
| Shopper | Checkout | Respect coupon usage contraints | shopper/cart-checkout-coupons.spec.js |
|
||||
| Shopper | Checkout | Respect coupon usage constraints | shopper/cart-checkout-coupons.spec.js |
|
||||
| Shopper | Checkout | Display correct tax in checkout | shopper/cart-checkout-calculate-tax.spec.js |
|
||||
| Shopper | Checkout | View order confirmation page | shopper/checkout.spec.js |
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ cd woocommerce-admin
|
|||
npm run build
|
||||
```
|
||||
|
||||
Once thats working, we can setup the extension folder ready for JavaScript development.
|
||||
Once that's working, we can setup the extension folder ready for JavaScript development.
|
||||
|
||||
```sh
|
||||
npm run create-wc-extension
|
||||
|
|
|
@ -49,7 +49,7 @@ Insomnia is almost identical to Postman; fill in the same fields and again use b
|
|||
|
||||
![Insomnia](https://developer.woocommerce.com/wp-content/uploads/2023/12/insomnia.png)
|
||||
|
||||
Thats it! The API is working.
|
||||
That's it! The API is working.
|
||||
|
||||
If you have problems connecting, you may need to disable SSL verification - see the connection issues section below.
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
category_title: Theme Development
|
||||
category_title: Classic Theme Development
|
||||
category_slug: theme-development
|
||||
post_title: Theme Development
|
||||
post_title: Classic theme development
|
||||
---
|
||||
|
||||
Learn to design and integrate custom themes in WooCommerce, focusing on responsive design and ecommerce optimization.
|
||||
|
||||
This document was created for use when developing classic themes. Check this other document for [block theme development](../../plugins/woocommerce-blocks/docs/designers/theming/README.md).
|
||||
For blocks themes, see our [block theme documentation](/docs/category/block-theme-development).
|
||||
|
|
|
@ -4,120 +4,148 @@ post_title: Template structure & Overriding templates via a theme
|
|||
|
||||
---
|
||||
|
||||
**Note:** this document is geared toward template development for classic themes. Check this other document for [block theme development](../../plugins/woocommerce-blocks/docs/designers/theming/README.md).
|
||||
We are unable to provide support for customizations under our [Support Policy](http://woocommerce.com/support-policy/). If you
|
||||
need to further customize a snippet, or extend its functionality, we highly
|
||||
recommend [Codeable](https://codeable.io/?ref=z4Hnp), or a [Certified WooExpert](https://woocommerce.com/experts/).
|
||||
**NOTE** This document makes reference to classic themes which use PHP templates. If you are working on a block theme with HTML templates, [please check the Theming docs for block themes](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-blocks/docs/designers/theming/README.md).
|
||||
Overview
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
---
|
||||
WooCommerce template files contain the markup and template structure for the frontend and HTML emails of your store.
|
||||
|
||||
Below is video walkthrough showing how one may go about updating the template files.
|
||||
|
||||
WooCommerce template files contain the **markup** and **template structure** for **frontend and HTML emails** of your
|
||||
store.
|
||||
|
||||
[![Documentation for Template structure & Overriding templates via a theme](https://embed-ssl.wistia.com/deliveries/a2f57c5896505b39952aa8411a474066.jpg?image_play_button_size=2x&image_crop_resized=960x540&image_play_button=1&image_play_button_color=694397e0)](https://woocommerce.com/document/template-structure/?wvideo=8mvl4bro0g)
|
||||
|
||||
When you open these files, you will notice they all contain **hooks** that allow you to add/move content without needing
|
||||
to edit template files themselves. This method protects against upgrade issues, as the template files can be left
|
||||
completely untouched.
|
||||
|
||||
## Template List
|
||||
## Template list
|
||||
|
||||
The various template files on your WooCommerce site can be found via an FTP client or your hosts file manager, in `/wp-content/plugins/woocommerce/templates/`. Below are links to the current and earlier versions of the WooCommerce template files on Github, where you can view the code exactly as it appears in those files:
|
||||
|
||||
| Latest Version | Files |
|
||||
| -------------- | ----- |
|
||||
| 8.9 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.9.0/plugins/woocommerce/templates) |
|
||||
|
||||
Below are the links to the files of all major previous WooCommerce versions:
|
||||
|
||||
| Version | Files |
|
||||
| -------------- | ----- |
|
||||
| 8.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.8.0/plugins/woocommerce/templates) |
|
||||
| 8.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.7.0/plugins/woocommerce/templates) |
|
||||
| 8.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.6.0/plugins/woocommerce/templates) |
|
||||
| 8.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.5.0/plugins/woocommerce/templates) |
|
||||
| 8.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.4.0/plugins/woocommerce/templates) |
|
||||
| 8.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.3.0/plugins/woocommerce/templates) |
|
||||
| 8.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.2.0/plugins/woocommerce/templates) |
|
||||
| 8.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.1.0/plugins/woocommerce/templates) |
|
||||
| 8.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.0.0/plugins/woocommerce/templates) |
|
||||
| 7.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.9.0/plugins/woocommerce/templates) |
|
||||
| 7.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.8.0/plugins/woocommerce/templates) |
|
||||
| 7.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.7.0/plugins/woocommerce/templates) |
|
||||
| 7.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.6.0/plugins/woocommerce/templates) |
|
||||
| 7.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.5.0/plugins/woocommerce/templates) |
|
||||
| 7.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.4.0/plugins/woocommerce/templates) |
|
||||
| 7.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.3.0/plugins/woocommerce/templates) |
|
||||
| 7.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.2.0/plugins/woocommerce/templates) |
|
||||
| 7.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.1.0/plugins/woocommerce/templates) |
|
||||
| 7.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.0.0/plugins/woocommerce/templates) |
|
||||
| 6.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.9.0/plugins/woocommerce/templates) |
|
||||
| 6.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.8.0/plugins/woocommerce/templates) |
|
||||
| 6.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.7.0/plugins/woocommerce/templates) |
|
||||
| 6.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.6.0/plugins/woocommerce/templates) |
|
||||
| 6.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.5.0/plugins/woocommerce/templates) |
|
||||
| 6.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.4.0/plugins/woocommerce/templates) |
|
||||
| 6.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.3.0/plugins/woocommerce/templates) |
|
||||
| 6.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.2.0/plugins/woocommerce/templates) |
|
||||
| 6.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.1.0/plugins/woocommerce/templates) |
|
||||
| 6.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.0.0/plugins/woocommerce/templates) |
|
||||
| 5.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.9.0/templates) |
|
||||
| 5.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.8.0/templates) |
|
||||
| 5.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.7.0/templates) |
|
||||
| 5.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.6.0/templates) |
|
||||
| 5.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.5.0/templates) |
|
||||
| 5.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.4.0/templates) |
|
||||
| 5.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.3.0/templates) |
|
||||
| 5.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.2.0/templates) |
|
||||
| 5.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.1.0/templates) |
|
||||
| 5.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.0.0/templates) |
|
||||
| 4.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.9.0/templates) |
|
||||
| 4.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.8.0/templates) |
|
||||
| 4.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.7.0/templates) |
|
||||
| 4.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.6.0/templates) |
|
||||
| 4.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.5.0/templates) |
|
||||
| 4.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.4.0/templates) |
|
||||
| 4.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.3.0/templates) |
|
||||
| 4.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.2.0/templates) |
|
||||
| 4.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.1.0/templates) |
|
||||
| 4.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.0.0/templates) |
|
||||
| 3.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.9.0/templates) |
|
||||
| 3.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.8.0/templates) |
|
||||
| 3.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.7.0/templates) |
|
||||
| 3.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.6.0/templates) |
|
||||
| 3.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.5.0/templates) |
|
||||
| 3.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.4.0/templates) |
|
||||
| 3.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.3.0/templates) |
|
||||
| 3.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.2.0/templates) |
|
||||
| 3.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.1.0/templates) |
|
||||
| 3.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.0.0/templates) |
|
||||
| 2.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/2.6.0/templates) |
|
||||
|
||||
|
||||
## Changing Templates via Hooks
|
||||
|
||||
When you open a template file, you will notice they all contain _hooks_ that allow you to add/move content without needing to edit template files themselves. Hooks are a way for one piece of code to interact/modify another piece of code at specific, pre-defined spots. This method allows implementing a code snippet that “hooks” into a particular a theme location. It avoids upgrade issues, as the template files can be left completely untouched and doesn't require a child theme to be configured.
|
||||
|
||||
Let's take a look at [/wp-content/plugins/woocommerce/templates/emails/admin-new-order.php](https://github.com/woocommerce/woocommerce/blob/8.9.0/plugins/woocommerce/templates/emails/admin-new-order.php) and see what a hook looks like. Starting on line 30, we see the following code, which is responsible for producing the order details section of the New Order email.
|
||||
|
||||
```php
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
```
|
||||
|
||||
The code above outputs the block highlighted in red in the image below, which is the New Order email a shop manager receives following a successful order on their site:
|
||||
|
||||
![image](https://woocommerce.com/wp-content/uploads/2020/05/templating-using-hooks.webp)
|
||||
|
||||
A code below can be used as a starting point to build out desired functionality. It can then be added to a code snippets plugin to modify the output at that particular location in the template, without having to edit the template itself. The same goes for other hooks, wherever in the templates they may appear.
|
||||
|
||||
```php
|
||||
add_action( 'woocommerce_email_order_details', 'my_custom_woo_function');
|
||||
function my_custom_woo_function() {
|
||||
/* Your code goes here */
|
||||
}
|
||||
```
|
||||
|
||||
## Changing Templates by Editing the Files
|
||||
|
||||
Editing files directly in a plugin or a parent theme creates the risk of causing errors that could bring a site to a grinding halt. But more importantly, any changes made in this way will disappear when the plugin or theme updates itself; a process that entirely deletes the old version and replaces it with a fresh, updated copy.
|
||||
|
||||
Instead, the recommended approach is to [set up a child theme](https://developer.woocommerce.com/docs/how-to-set-up-and-use-a-child-theme/), which creates a safe directory where to make overriding changes that will not be automatically updated.
|
||||
|
||||
For this example, let's call our child theme `storefront-child`. With `storefront-child` in place, edits can be made in an upgrade-safe way by using overrides. Copy the template into a directory within your child theme named `/storefront-child/woocommerce/` keeping the same file structure but removing the `/templates/` subdirectory.
|
||||
|
||||
To override the admin order notification in our example, copy `wp-content/plugins/woocommerce/templates/emails/admin-new-order.php` to `wp-content/themes/storefront-child/woocommerce/emails/admin-new-order.php`
|
||||
|
||||
The copied file will now override the WooCommerce default template file, so you can make any changes you wish to the copied file, and see it reflected in the resulting output.
|
||||
|
||||
---
|
||||
|
||||
Template files can be found within the **/woocommerce/templates/** directory:
|
||||
|
||||
| Latest version | Files |
|
||||
|:---------------|:-----------------------------------------------------------------------------------------------------------|
|
||||
| v8.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.4.0/plugins/woocommerce/templates) |
|
||||
|
||||
---
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<details>
|
||||
<summary>Expand to view files of all major previous versions</summary>
|
||||
|
||||
| Version | Files |
|
||||
|---------|------------------------------------------------------------------------------------------------------------|
|
||||
| v8.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.3.0/plugins/woocommerce/templates) |
|
||||
| v8.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.2.0/plugins/woocommerce/templates) |
|
||||
| v.8.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.1.0/plugins/woocommerce/templates) |
|
||||
| v8.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/8.0.0/plugins/woocommerce/templates) |
|
||||
| v7.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.9.0/plugins/woocommerce/templates) |
|
||||
| v7.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.8.0/plugins/woocommerce/templates) |
|
||||
| v7.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.7.0/plugins/woocommerce/templates) |
|
||||
| v7.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.6.0/plugins/woocommerce/templates) |
|
||||
| v7.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.5.0/plugins/woocommerce/templates) |
|
||||
| v7.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.4.0/plugins/woocommerce/templates) |
|
||||
| v7.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.3.0/plugins/woocommerce/templates) |
|
||||
| v7.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.2.0/plugins/woocommerce/templates) |
|
||||
| v7.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.1.0/plugins/woocommerce/templates) |
|
||||
| v7.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/7.0.0/plugins/woocommerce/templates) |
|
||||
| v6.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.9.0/plugins/woocommerce/templates) |
|
||||
| v6.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.8.0/plugins/woocommerce/templates) |
|
||||
| v6.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.7.0/plugins/woocommerce/templates) |
|
||||
| v6.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.6.0/plugins/woocommerce/templates) |
|
||||
| v6.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.5.0/plugins/woocommerce/templates) |
|
||||
| v6.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.4.0/plugins/woocommerce/templates) |
|
||||
| v6.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.3.0/plugins/woocommerce/templates) |
|
||||
| v6.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.2.0/plugins/woocommerce/templates) |
|
||||
| v6.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.1.0/plugins/woocommerce/templates) |
|
||||
| v6.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/6.0.0/plugins/woocommerce/templates) |
|
||||
| v5.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.9.0/templates) |
|
||||
| v5.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.8.0/templates) |
|
||||
| v5.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.7.0/templates) |
|
||||
| v5.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.6.0/templates) |
|
||||
| v5.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.5.0/templates) |
|
||||
| v5.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.4.0/templates) |
|
||||
| v5.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.3.0/templates) |
|
||||
| v5.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.2.0/templates) |
|
||||
| v5.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.1.0/templates) |
|
||||
| v5.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/5.0.0/templates) |
|
||||
| v4.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.9.0/templates) |
|
||||
| v4.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.8.0/templates) |
|
||||
| v4.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.7.0/templates) |
|
||||
| v4.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.6.0/templates) |
|
||||
| v4.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.5.0/templates) |
|
||||
| v4.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.4.0/templates) |
|
||||
| v4.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.3.0/templates) |
|
||||
| v4.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.2.0/templates) |
|
||||
| v4.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.1.0/templates) |
|
||||
| v4.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/4.0.0/templates) |
|
||||
| v3.9.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.9.0/templates) |
|
||||
| v3.8.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.8.0/templates) |
|
||||
| v3.7.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.9.0/templates) |
|
||||
| v3.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.6.0/templates) |
|
||||
| v3.5.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.5.0/templates) |
|
||||
| v3.4.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.4.0/templates) |
|
||||
| v3.3.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.3.0/templates) |
|
||||
| v3.2.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.2.0/templates) |
|
||||
| v3.1.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.1.0/templates) |
|
||||
| v3.0.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/3.0.0/templates) |
|
||||
| v2.6.0 | [View template files](https://github.com/woocommerce/woocommerce/tree/2.6.0/templates) |
|
||||
</details>
|
||||
<!-- markdownlint-enable MD033 -->
|
||||
**Note** A (desirable) side-effect of your templates being upgrade-safe is that WooCommerce core templates will update, but your custom overrides will not. You may occassionally see notices in your System Status report that says, e.g. “version 3.5.0 is out of date. The core version is 3.7.0″. Should that happen, follow the Fixing Outdated WooCommerce Templates guide to bring them in line.
|
||||
|
||||
---
|
||||
|
||||
## How to Edit Files
|
||||
|
||||
---
|
||||
|
||||
Edit files in an **upgrade-safe** way using **overrides**. Copy the template into a directory within your theme named `/woocommerce` keeping the same file structure but removing the `/templates/` subdirectory.
|
||||
|
||||
Example: To override the admin order notification, copy: `wp-content/plugins/woocommerce/templates/emails/admin-new-order.php` to `wp-content/themes/yourtheme/woocommerce/emails/admin-new-order.php`.
|
||||
|
||||
The copied file will now override the WooCommerce default template file.
|
||||
|
||||
**Warning:** Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost. For more detailed information, see [Fixing Outdated WooCommerce Templates](https://woocommerce.com/document/fix-outdated-templates-woocommerce/).
|
||||
|
||||
## For Custom Templates
|
||||
## Declare Theme Support for Custom Templates
|
||||
|
||||
If you are a theme developer or using a theme with custom templates, you must declare WooCommerce theme support using the `add_theme_support` function. See [Declaring WooCommerce Support in Themes](https://github.com/woocommerce/woocommerce/wiki/Declaring-WooCommerce-support-in-themes) at GitHub.
|
||||
|
||||
If your theme has a `woocommerce.php` file, you will be unable to override the `woocommerce/archive-product.php` custom template in your theme, as `woocommerce.php` has priority over other template files. This is intended to prevent display issues.
|
||||
If your theme has `woocommerce.php`, you will be unable to override `woocommerce/archive-product.php` custom template in your theme, as `woocommerce.php` has priority over other template files. This is intended to prevent display issues.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"packageManager": "pnpm@9.1.3",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e": "jest",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Add AnalyticsError component.
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Mark props with defaults as not required
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Fixed missing styles on TreeSelectControl by copying from @wordpress/components/CheckboxControl and importing @wordpress/base-styles
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# AnalyticsError
|
||||
|
||||
Standard error message with reload action used in Analytics pages.
|
||||
|
||||
## Usage
|
||||
|
||||
```jsx
|
||||
<AnalyticsError />
|
||||
```
|
||||
|
||||
### Props
|
||||
|
||||
Name | Type | Default | Description
|
||||
--- | --- | --- | ---
|
||||
`className` | String | `null` | Additional CSS classes
|
|
@ -3,16 +3,21 @@
|
|||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import PropTypes from 'prop-types';
|
||||
import { EmptyContent } from '@woocommerce/components';
|
||||
import { createElement } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Component to render when there is an error in a report component due to data
|
||||
* Internal dependencies
|
||||
*/
|
||||
import EmptyContent from '../../empty-content';
|
||||
|
||||
/**
|
||||
* Component to render when there is an error in an analytics component due to data
|
||||
* not being loaded or being invalid.
|
||||
*
|
||||
* @param {Object} props React props.
|
||||
* @param {string} [props.className] Additional class name to style the component.
|
||||
*/
|
||||
function ReportError( { className } ) {
|
||||
function AnalyticsError( { className } ) {
|
||||
const title = __(
|
||||
'There was an error getting your stats. Please try again.',
|
||||
'woocommerce'
|
||||
|
@ -32,11 +37,11 @@ function ReportError( { className } ) {
|
|||
);
|
||||
}
|
||||
|
||||
ReportError.propTypes = {
|
||||
AnalyticsError.propTypes = {
|
||||
/**
|
||||
* Additional class name to style the component.
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
export default ReportError;
|
||||
export default AnalyticsError;
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { createElement } from '@wordpress/element';
|
||||
import { Story } from '@storybook/react';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import AnalyticsError from '../';
|
||||
|
||||
const Template: Story = ( args ) => <AnalyticsError { ...args } />;
|
||||
|
||||
export const Basic = Template.bind( {} );
|
||||
|
||||
export default {
|
||||
title: 'WooCommerce Admin/components/analytics/AnalyticsError',
|
||||
component: AnalyticsError,
|
||||
};
|
|
@ -0,0 +1,31 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`AnalyticsError should match snapshot 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="woocommerce-empty-content"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
class="woocommerce-empty-content__illustration"
|
||||
src="data:image/svg+xml;utf8,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 400 400\\"%3E%3Cpath d=\\"M226.153073,88.3099993 L355.380187,301.446227 C363.970299,315.614028 359.448689,334.062961 345.280888,342.653073 C340.591108,345.496544 335.21158,347 329.727115,347 L71.2728854,347 C54.7043429,347 41.2728854,333.568542 41.2728854,317 C41.2728854,311.515534 42.7763415,306.136007 45.6198127,301.446227 L174.846927,88.3099993 C183.437039,74.1421985 201.885972,69.6205881 216.053773,78.2106999 C220.184157,80.7150022 223.64877,84.1796157 226.153073,88.3099993 Z M184.370159,153 L186.899684,255.024156 L213.459691,255.024156 L215.989216,153 L184.370159,153 Z M200.179688,307.722584 C209.770801,307.722584 217.359375,300.450201 217.359375,291.175278 C217.359375,281.900355 209.770801,274.627972 200.179688,274.627972 C190.588574,274.627972 183,281.900355 183,291.175278 C183,300.450201 190.588574,307.722584 200.179688,307.722584 Z\\" id=\\"Combined-Shape\\" stroke=\\"%23c0c0c0\\" fill=\\"%23c0c0c0\\" fill-rule=\\"nonzero\\"%3E%3C/path%3E%3C/svg%3E"
|
||||
width="100"
|
||||
/>
|
||||
<h2
|
||||
class="woocommerce-empty-content__title"
|
||||
>
|
||||
There was an error getting your stats. Please try again.
|
||||
</h2>
|
||||
<div
|
||||
class="woocommerce-empty-content__actions"
|
||||
>
|
||||
<button
|
||||
class="components-button woocommerce-empty-content__action is-primary"
|
||||
type="button"
|
||||
>
|
||||
Reload
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
|
@ -0,0 +1,62 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { createElement } from '@wordpress/element';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import AnalyticsError from '..';
|
||||
|
||||
describe( 'AnalyticsError', () => {
|
||||
// Mock window.location.reload by using a global variable
|
||||
const originalLocation = window.location;
|
||||
|
||||
beforeAll( () => {
|
||||
delete window.location;
|
||||
window.location = { reload: jest.fn() };
|
||||
} );
|
||||
|
||||
afterAll( () => {
|
||||
window.location = originalLocation;
|
||||
} );
|
||||
|
||||
it( 'displays an error message', () => {
|
||||
render( <AnalyticsError /> );
|
||||
|
||||
expect(
|
||||
screen.getByText(
|
||||
'There was an error getting your stats. Please try again.'
|
||||
)
|
||||
).toBeInTheDocument();
|
||||
} );
|
||||
|
||||
it( 'shows reload button', () => {
|
||||
render( <AnalyticsError /> );
|
||||
|
||||
expect(
|
||||
screen.getByRole( 'button', { name: 'Reload' } )
|
||||
).toBeInTheDocument();
|
||||
} );
|
||||
|
||||
it( 'refreshes the page when Reload Page button is clicked', () => {
|
||||
const reloadMock = jest.fn();
|
||||
Object.defineProperty( window.location, 'reload', {
|
||||
configurable: true,
|
||||
value: reloadMock,
|
||||
} );
|
||||
|
||||
render( <AnalyticsError /> );
|
||||
|
||||
userEvent.click( screen.getByText( 'Reload' ) );
|
||||
|
||||
expect( reloadMock ).toHaveBeenCalled();
|
||||
} );
|
||||
|
||||
it( 'should match snapshot', () => {
|
||||
const { container } = render( <AnalyticsError /> );
|
||||
expect( container ).toMatchSnapshot();
|
||||
} );
|
||||
} );
|
|
@ -0,0 +1 @@
|
|||
export { default as AnalyticsError } from './error';
|
|
@ -1,5 +1,6 @@
|
|||
export { default as AbbreviatedCard } from './abbreviated-card';
|
||||
export { default as AdvancedFilters } from './advanced-filters';
|
||||
export * from './analytics';
|
||||
export { default as AnimationSlider } from './animation-slider';
|
||||
export { default as Chart } from './chart';
|
||||
export { default as ChartPlaceholder } from './chart/placeholder';
|
||||
|
|
|
@ -192,8 +192,7 @@ SummaryNumber.propTypes = {
|
|||
/**
|
||||
* The type of the link
|
||||
*/
|
||||
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] )
|
||||
.isRequired,
|
||||
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] ),
|
||||
/**
|
||||
* Boolean describing whether the menu list is open. Only applies in mobile view,
|
||||
* and only applies to the toggle-able item (first in the list).
|
||||
|
|
|
@ -99,7 +99,7 @@ Timeline.propTypes = {
|
|||
*/
|
||||
hideTimestamp: PropTypes.bool,
|
||||
} )
|
||||
).isRequired,
|
||||
),
|
||||
/**
|
||||
* Defines how items should be grouped together.
|
||||
*/
|
||||
|
|
|
@ -94,8 +94,8 @@ TimelineGroup.propTypes = {
|
|||
*/
|
||||
hideTimestamp: PropTypes.bool,
|
||||
} )
|
||||
).isRequired,
|
||||
} ).isRequired,
|
||||
),
|
||||
} ),
|
||||
/**
|
||||
* Defines how items should be ordered.
|
||||
*/
|
||||
|
|
|
@ -69,7 +69,7 @@ TimelineItem.propTypes = {
|
|||
* The PHP clock format string used to format times, see php.net/date.
|
||||
*/
|
||||
clockFormat: PropTypes.string,
|
||||
} ).isRequired,
|
||||
} ),
|
||||
};
|
||||
|
||||
export default TimelineItem;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import "node_modules/@wordpress/base-styles/mixins";
|
||||
|
||||
$gap-largest: 40px;
|
||||
$gap-larger: 36px;
|
||||
$gap-large: 24px;
|
||||
|
@ -198,14 +200,87 @@ $muriel-box-shadow-8dp: 0 5px 5px -3px rgb(0 0 0 / 20%),
|
|||
}
|
||||
|
||||
&.is-partially-checked {
|
||||
.components-checkbox-control__input-container {
|
||||
.components-checkbox-control__input[type="checkbox"] {
|
||||
background: var(--wp-admin-theme-color);
|
||||
border: $gap-smallest solid $white;
|
||||
box-shadow: 0 0 0 1px #1e1e1e;
|
||||
|
||||
&:focus {
|
||||
border-color: $white;
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.components-checkbox-control__input {
|
||||
background: var(--wp-admin-theme-color);
|
||||
border: $gap-smallest solid $white;
|
||||
box-shadow: 0 0 0 1px #1e1e1e;
|
||||
// At the time of this comment, it was discovered that this component has
|
||||
// the same classnames as the WP Components Checkbox, without it being a code depedency.
|
||||
// This caused some visual breakages when changes happened in WP 6.6, and
|
||||
// the rules have been copied over from WP Components styles of 6.5.1.
|
||||
// https://github.com/WordPress/gutenberg/blob/403b4b8d014ef7f6edc15c822e455e109bf49c6d/packages/components/src/checkbox-control/style.scss#L4
|
||||
// mixins were imported from @wordpress/base-styles as there's a significant amount of rules if
|
||||
// it were to be copied. I think the risk of them changing is lower than the chance we decide to upstream this component.
|
||||
.components-checkbox-control__input-container {
|
||||
$checkbox-input-size: 20px;
|
||||
$checkbox-input-size-sm: 24px; // Width & height for small viewports.
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
height: $checkbox-input-size-sm;
|
||||
width: $checkbox-input-size-sm;
|
||||
display: inline-block;
|
||||
margin-right: 12px;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
|
||||
@include break-small() {
|
||||
height: $checkbox-input-size;
|
||||
width: $checkbox-input-size;
|
||||
}
|
||||
|
||||
.components-checkbox-control__input[type="checkbox"] {
|
||||
@include checkbox-control;
|
||||
background: $white;
|
||||
color: $gray-900;
|
||||
clear: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
margin: 0 $grid-unit-05 0 0;
|
||||
outline: 0;
|
||||
padding: 0 !important;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
width: $checkbox-input-size-sm;
|
||||
height: $checkbox-input-size-sm;
|
||||
|
||||
@include break-small() {
|
||||
height: $checkbox-input-size;
|
||||
width: $checkbox-input-size;
|
||||
}
|
||||
|
||||
appearance: none;
|
||||
@include reduce-motion("transition");
|
||||
|
||||
&:checked,
|
||||
&:indeterminate {
|
||||
$components-color-accent: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
||||
background: $components-color-accent;
|
||||
border-color: $components-color-accent;
|
||||
|
||||
// Hide default checkbox styles in IE.
|
||||
&::-ms-check {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:checked::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
|
||||
@include break-small {
|
||||
height: $checkbox-input-size;
|
||||
width: $checkbox-input-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -7,7 +7,7 @@
|
|||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"changelog": "composer install && composer exec -- changelogger"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -5,7 +5,7 @@
|
|||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -102,4 +102,20 @@ describe( 'currency.formatDecimalString', () => {
|
|||
// @ts-expect-error formatAccount expects a number or string;
|
||||
expect( currency.formatDecimalString( null ) ).toBe( '' );
|
||||
} );
|
||||
|
||||
it( 'should strip tags in getPriceFormat', () => {
|
||||
const currency = Currency();
|
||||
|
||||
expect(
|
||||
currency.getPriceFormat( {
|
||||
priceFormat: '<b>tag</b>format',
|
||||
} )
|
||||
).toBe( 'tagformat' );
|
||||
|
||||
expect(
|
||||
currency.getPriceFormat( {
|
||||
priceFormat: '<script>tag</script>format',
|
||||
} )
|
||||
).toBe( 'format' );
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -66,9 +66,17 @@ const CurrencyFactoryBase = function ( currencySetting?: CurrencyConfig ) {
|
|||
let currency: Currency;
|
||||
|
||||
function stripTags( str: string ) {
|
||||
const tmp = document.createElement( 'DIV' );
|
||||
tmp.innerHTML = str;
|
||||
return tmp.textContent || tmp.innerText || '';
|
||||
// sanitize Polyfill - see https://github.com/WordPress/WordPress/blob/master/wp-includes/js/wp-sanitize.js
|
||||
const strippedStr = str
|
||||
.replace( /<!--[\s\S]*?(-->|$)/g, '' )
|
||||
.replace( /<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi, '' )
|
||||
.replace( /<\/?[a-z][\s\S]*?(>|$)/gi, '' );
|
||||
|
||||
if ( strippedStr !== str ) {
|
||||
return stripTags( strippedStr );
|
||||
}
|
||||
|
||||
return strippedStr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Update user preferences types and logic
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -33,13 +33,12 @@ export type UserPreferences = {
|
|||
product_advice_card_dismissed?: {
|
||||
[ key: string ]: 'yes' | 'no';
|
||||
};
|
||||
launch_your_store_tour_hidden?: 'yes' | 'no' | '';
|
||||
coming_soon_banner_dismissed?: 'yes' | 'no' | '';
|
||||
};
|
||||
|
||||
export type WoocommerceMeta = UserPreferences & {
|
||||
task_list_tracked_started_tasks?: string;
|
||||
variable_items_without_price_notice_dismissed?: string;
|
||||
local_attributes_notice_dismissed_ids?: string;
|
||||
product_advice_card_dismissed?: string;
|
||||
export type WoocommerceMeta = {
|
||||
[ key in keyof UserPreferences ]: string;
|
||||
};
|
||||
|
||||
export type WCUser<
|
||||
|
|
|
@ -19,28 +19,15 @@ import { WCUser, UserPreferences } from './types';
|
|||
const getWooCommerceMeta = ( user: WCUser ) => {
|
||||
const wooMeta = user.woocommerce_meta || {};
|
||||
|
||||
const userData = mapValues( wooMeta, ( data, key ) => {
|
||||
const userData = mapValues( wooMeta, ( data ) => {
|
||||
if ( ! data || data.length === 0 ) {
|
||||
return '';
|
||||
}
|
||||
try {
|
||||
return JSON.parse( data );
|
||||
} catch ( e ) {
|
||||
if ( e instanceof Error ) {
|
||||
/* eslint-disable no-console */
|
||||
console.error(
|
||||
`Error parsing value '${ data }' for ${ key }`,
|
||||
e.message
|
||||
);
|
||||
/* eslint-enable no-console */
|
||||
} else {
|
||||
/* eslint-disable no-console */
|
||||
console.error(
|
||||
`Unexpected Error parsing value '${ data }' for ${ key } ${ e }`
|
||||
);
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
return '';
|
||||
// If we can't parse the value, return the raw data. The meta value could be a string like 'yes' or 'no'.
|
||||
return data;
|
||||
}
|
||||
} );
|
||||
|
||||
|
@ -53,7 +40,7 @@ async function updateUserPrefs(
|
|||
user: WCUser,
|
||||
saveUser: ( userToSave: {
|
||||
id: number;
|
||||
woocommerce_meta: { [ key: string ]: boolean };
|
||||
woocommerce_meta: WCUser[ 'woocommerce_meta' ];
|
||||
} ) => WCUser,
|
||||
getLastEntitySaveError: (
|
||||
kind: string,
|
||||
|
@ -64,7 +51,14 @@ async function updateUserPrefs(
|
|||
) {
|
||||
// @todo Handle unresolved getCurrentUser() here.
|
||||
// Prep fields for update.
|
||||
const metaData = mapValues( userPrefs, JSON.stringify );
|
||||
const metaData = mapValues( userPrefs, ( value ) => {
|
||||
if ( typeof value === 'string' ) {
|
||||
// If the value is a string, we don't need to serialize it.
|
||||
return value;
|
||||
}
|
||||
|
||||
return JSON.stringify( value );
|
||||
} );
|
||||
|
||||
if ( Object.keys( metaData ).length === 0 ) {
|
||||
return {
|
||||
|
@ -81,7 +75,6 @@ async function updateUserPrefs(
|
|||
...metaData,
|
||||
},
|
||||
} );
|
||||
|
||||
// Use saveUser() to update WooCommerce meta values.
|
||||
const updatedUser = await saveUser( {
|
||||
id: user.id,
|
||||
|
|
|
@ -212,7 +212,7 @@ Calculates the date difference between two dates. Used in calculating a matching
|
|||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| date | <code>string</code> | Date to compare |
|
||||
| date2 | <code>string</code> | Seconary date to compare |
|
||||
| date2 | <code>string</code> | Secondary date to compare |
|
||||
|
||||
<a name="getPreviousDate"></a>
|
||||
|
||||
|
@ -279,7 +279,7 @@ Get a DateValue object for a period prior to the current period.
|
|||
<a name="getCurrentPeriod"></a>
|
||||
|
||||
### getCurrentPeriod(period, compare) ⇒ [<code>DateValue</code>](#DateValue)
|
||||
Get a DateValue object for a curent period. The period begins on the first day of the period,
|
||||
Get a DateValue object for a current period. The period begins on the first day of the period,
|
||||
and ends on the current day.
|
||||
|
||||
**Kind**: global function
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Comment: Fix typos in documentation.
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"license": "GPL-3.0+",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"module": "build-module/index.js",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md",
|
||||
"bugs": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"license": "GPL-3.0+",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"module": "build-module/index.js",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -12,7 +12,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Update all blocks to use API Version 3.
|
|
@ -5,7 +5,7 @@
|
|||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"apiVersion": 2,
|
||||
"apiVersion": 3,
|
||||
"name": "{{slug}}/checkout-newsletter-subscription",
|
||||
"version": "2.0.0",
|
||||
"title": "Newsletter Subscription!",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"e2e-builds": "./build.js"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix pnpm version to 9.1.3 to avoid dependency installation issues.
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md",
|
||||
"repository": {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"engines": {
|
||||
"node": "^20.11.1",
|
||||
"pnpm": "^9.1.0"
|
||||
"pnpm": "9.1.3"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue