Merge branch 'trunk' into issue-42616/fix-price-filter-category-issue

This commit is contained in:
Luigi Teschio 2024-08-26 10:16:08 +02:00 committed by GitHub
commit 63b2e6f07e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1432 changed files with 43362 additions and 16808 deletions

View File

@ -0,0 +1,78 @@
# How to update
## Source code
This action is extracted and bundled version of the following:
Repository: https://github.com/WordPress/gutenberg/tree/trunk/packages/report-flaky-tests
Commit ID: ce803384250671d01fde6c7d6d2aa83075fcc726
## How to build
After checking out the repository, navigate to packages/report-flaky-tests and do some modifications:
### package.json file
Add the following dependency: `"ts-loader": "^9.5.1",`.
### tsconfig.json file
The file context should be updated to following state:
```
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"target": "es6",
"module": "commonjs",
"esModuleInterop": true,
"moduleResolution": "node",
"declarationDir": "build-types",
"rootDir": "src",
"emitDeclarationOnly": false,
},
"include": [ "src/**/*" ],
"exclude": [ "src/__tests__/**/*", "src/__fixtures__/**/*" ]
}
```
### webpack.config.js file
The file should be added with the following content:
```
const path = require( 'path' );
const buildMode = process.env.NODE_ENV || 'production';
module.exports = {
entry: './src/index.ts',
target: 'node',
mode: buildMode,
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ],
},
plugins: [],
output: {
filename: 'index.js',
path: path.resolve( __dirname, 'dist' ),
clean: true,
},
};
```
### Build
Run `webpack --config webpack.config.js` (don't forget about `npm install` before that).
Use the generated files under `packages/report-flaky-tests/dist` to update the bundled distribution in this repository.

View File

@ -22,14 +22,14 @@ inputs:
runs:
using: 'composite'
steps:
- name: 'Read PNPM Version'
id: 'read-pnpm-version'
shell: 'bash'
run: 'echo "version=$(./.github/actions/setup-woocommerce-monorepo/scripts/read-pnpm-version.sh package.json)" >> $GITHUB_OUTPUT'
- name: 'Setup PNPM'
uses: 'pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d'
with:
version: ${{ steps.read-pnpm-version.outputs.version }}
# Next step is rudimentary - fixes a know composite action bug during post-actions:
# Error: Index was out of range. Must be non-negative and less than the size of the collection.
- name: 'Read PNPM version'
id: 'read-pnpm-version'
shell: 'bash'
run: 'echo "version=$(pnpm --version)" >> $GITHUB_OUTPUT'
- name: 'Setup Node'
uses: 'actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65'
with:

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
PACKAGE_FILE=$1
if [[ -z "$PACKAGE_FILE" ]]; then
echo "Usage: $0 <package.json>"
exit 1
fi
awk -F'"' '/"pnpm": ".+"/{ print $4; exit; }' $PACKAGE_FILE

View File

@ -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/**/*":

View File

@ -16,7 +16,8 @@ on:
type: string
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}-${{ inputs.trigger }}'
# Cancel concurrent jobs but not for push event. For push use the run_id to have a unique group.
group: ci-${{ github.event_name == 'push' && github.run_id || github.event_name }}-${{ github.ref }}-${{ inputs.trigger }}
cancel-in-progress: true
env:
@ -149,37 +150,92 @@ jobs:
env: ${{ matrix.testEnv.envVars }}
run: 'pnpm --filter="${{ matrix.projectName }}" ${{ matrix.testEnv.start }}'
- name: 'Get commit message'
id: 'get_commit_message'
- name: 'Determine BuildKite Analytics Message'
env:
HEAD_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
COMMIT_MESSAGE=`echo "$HEAD_COMMIT_MESSAGE" | head -1`
MESSAGE=`echo "$HEAD_COMMIT_MESSAGE" | head -1`
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
COMMIT_MESSAGE="$PR_TITLE"
MESSAGE="$PR_TITLE"
else
COMMIT_MESSAGE="${{ github.event_name }}"
MESSAGE="${{ github.event_name }}"
fi
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> "$GITHUB_OUTPUT"
echo "BUILDKITE_ANALYTICS_MESSAGE=$MESSAGE" >> "$GITHUB_ENV"
shell: bash
- name: 'Run tests (${{ matrix.testType }})'
env:
E2E_ENV_KEY: ${{ secrets.E2E_ENV_KEY }}
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_CORE_E2E_TOKEN }}
BUILDKITE_ANALYTICS_MESSAGE: ${{ steps.get_commit_message.outputs.COMMIT_MESSAGE }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} # required by Metrics tests
run: 'pnpm --filter="${{ matrix.projectName }}" ${{ matrix.command }}'
- name: 'Resolve artifacts path'
if: ${{ always() && matrix.report.resultsPath != '' }}
# Blocks e2e use a relative path which is not supported by actions/upload-artifact@v4
# https://github.com/actions/upload-artifact/issues/176
env:
ARTIFACTS_PATH: '${{ matrix.projectPath }}/${{ matrix.report.resultsPath }}'
run: echo "ARTIFACTS_PATH=$(realpath $ARTIFACTS_PATH)" >> $GITHUB_ENV
run: |
# first runs will probably not have the directory, so we need to create it so that realpath doesn't fail
mkdir -p $ARTIFACTS_PATH
echo "ARTIFACTS_PATH=$(realpath $ARTIFACTS_PATH)" >> $GITHUB_ENV
- name: 'Download Playwright last run info'
id: 'download-last-run-info'
if: ${{ always() && matrix.report.resultsPath != '' && matrix.testType == 'e2e' }}
uses: actions/download-artifact@v4
with:
pattern: 'last-run__${{ strategy.job-index }}'
- name: 'Run tests (${{ matrix.testType }})'
env:
E2E_ENV_KEY: ${{ secrets.E2E_ENV_KEY }}
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_CORE_E2E_TOKEN }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} # required by Metrics tests
LAST_FAILED_RUN: ${{ vars.LAST_FAILED_RUN }}
run: |
lastRunFile="${{ steps.download-last-run-info.outputs.download-path }}/last-run__${{ strategy.job-index }}/.last-run.json"
lastRunFileDest="$ARTIFACTS_PATH/.last-run.json"
if [ -f "$lastRunFile" ]; then
echo "Found last run info file: \"$lastRunFile\""
echo "Moving to destination: \"$lastRunFileDest\""
mkdir -p "$ARTIFACTS_PATH"
mv "$lastRunFile" "$lastRunFileDest"
else
echo "No last run info file found. Searched for: \"$lastRunFile\""
fi
lastRunFlag=""
if [ -f "$lastRunFileDest" ]; then
# Playwright last run info is available, parse the file and check if there are failed tests
cat "$lastRunFileDest"
failedTests=$(jq '.failedTests | length' "$lastRunFileDest")
# Only if there are failed tests, we want to use the --last-failed flag.
# The run will fail if we're using the flag and there are no failed tests.
if [ "$failedTests" -gt 0 ]; then
if [ "$LAST_FAILED_RUN" == "1" ]; then
echo "Found failed tests, running only failed tests"
# Add shard 1/1 to override the default shard value. No tests will run for shards > 1.
# The clean way would be to replace the shard flag from the command, but this also works.
lastRunFlag="--last-failed --shard=1/1"
else
echo "Found failed tests, but LAST_FAILED_RUN is switched off. Running all tests."
fi
else
echo "No failed tests found, running all tests"
fi
fi
# Finally, run the tests
pnpm --filter="${{ matrix.projectName }}" ${{ matrix.command }} $lastRunFlag
- name: 'Upload Playwright last run info'
# always upload the last run info, even if the test run passed
if: ${{ always() && matrix.report.resultsPath != '' }}
uses: actions/upload-artifact@v4
with:
name: 'last-run__${{ strategy.job-index }}'
path: '${{ env.ARTIFACTS_PATH }}/.last-run.json'
if-no-files-found: ignore
overwrite: true
- name: 'Upload artifacts'
if: ${{ always() && matrix.report.resultsPath != '' }}
@ -194,15 +250,6 @@ jobs:
name: flaky-tests-${{ strategy.job-index }}
path: ${{ env.ARTIFACTS_PATH }}/flaky-tests
if-no-files-found: ignore
- name: 'Archive metrics results'
if: ${{ success() && startsWith(matrix.name, 'Metrics') }} # this seems too fragile, we should update the reporting path and use the generic upload step above
uses: actions/upload-artifact@v4
env:
WP_ARTIFACTS_PATH: ${{ github.workspace }}/artifacts
with:
name: metrics-results
path: ${{ env.WP_ARTIFACTS_PATH }}/*.performance-results*.json
evaluate-project-jobs:
# In order to add a required status check we need a consistent job that we can grab onto.

View File

@ -3,6 +3,7 @@ on:
pull_request:
paths:
- 'plugins/woocommerce/**'
- '!plugins/woocommerce/templates/templates/**'
jobs:
analyze:
name: 'Analyze Branch Changes'
@ -26,7 +27,7 @@ jobs:
GIT_CLONE_PROTECTION_ACTIVE: false
run: |
HEAD_REF=$(git rev-parse HEAD)
exclude="plugins/woocommerce/tests plugins/woocommerce-admin/tests plugins/woocommerce-blocks/tests"
exclude="plugins/woocommerce/tests plugins/woocommerce/templates/templates plugins/woocommerce-admin/tests plugins/woocommerce-blocks/tests"
version=$(pnpm analyzer major-minor "$HEAD_REF" "plugins/woocommerce/woocommerce.php" | tail -n 1)
pnpm analyzer "$HEAD_REF" $version -o "github" -e $exclude
- uses: 'actions/github-script@v6'

View File

@ -38,7 +38,7 @@ jobs:
docs/docs-manifest.json
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c

View File

@ -31,7 +31,6 @@ jobs:
issues: write
pull-requests: write
outputs:
pnpmVersion: ${{ steps.read-pnpm-version.outputs.version }}
isTodayAcceleratedFreeze: ${{ steps.get-versions.outputs.isTodayAcceleratedFreeze }}
isTodayMonthlyFreeze: ${{ steps.get-versions.outputs.isTodayMonthlyFreeze }}
acceleratedVersion: ${{ steps.get-versions.outputs.acceleratedVersion }}
@ -47,18 +46,8 @@ jobs:
with:
fetch-depth: 0
- name: Read PNPM Version
id: read-pnpm-version
shell: bash
run: |
version=$(./.github/actions/setup-woocommerce-monorepo/scripts/read-pnpm-version.sh package.json)
echo "version=$version" >> $GITHUB_OUTPUT
echo "PNPM Version: $version"
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: ${{ steps.read-pnpm-version.outputs.version }}
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
@ -149,9 +138,7 @@ jobs:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }}
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
@ -275,9 +262,7 @@ jobs:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }}
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
@ -346,9 +331,7 @@ jobs:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }}
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c

View File

@ -20,14 +20,10 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce'
build: '@woocommerce/plugin-woocommerce'
install: '@woocommerce/plugin-woocommerce-beta-tester...'
build: '@woocommerce/plugin-woocommerce-beta-tester...'
pull-package-deps: '@woocommerce/plugin-woocommerce-beta-tester'
- name: Lint
working-directory: plugins/woocommerce-beta-tester
run: composer run phpcs
- name: Build WooCommerce Beta Tester Zip
working-directory: plugins/woocommerce-beta-tester
run: pnpm build:zip

View File

@ -2,30 +2,49 @@
set -eo pipefail
function title() {
echo -e "\n\033[1m$1\033[0m"
}
if [[ -z "$GITHUB_EVENT_NAME" ]]; then
echo "::error::GITHUB_EVENT_NAME must be set"
exit 1
fi
title "Installing NVM"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash > /dev/null
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
echo "Installed version: $(nvm -v)"
title "Installing dependencies"
pnpm install --frozen-lockfile --filter="compare-perf" > /dev/null
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
echo "Comparing performance with trunk"
title "Comparing performance with trunk"
pnpm --filter="compare-perf" run compare perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA
elif [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
echo "Comparing performance with base branch"
# The base hash used here need to be a commit that is compatible with the current WP version
# The current one is 19f3d0884617d7ecdcf37664f648a51e2987cada
# it needs to be updated every time it becomes unsupported by the current wp-env (WP version).
# It is used as a base comparison point to avoid fluctuation in the performance metrics.
title "Comparing performance with base branch"
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
# Updating the WP version used for performance jobs means theres a high
# chance that the reference commit used for performance test stability
# becomes incompatible with the WP version. So, every time the "Tested up
# to" flag is updated in the readme.txt, we also have to update the
# reference commit below (BASE_SHA). The new reference needs to meet the
# following requirements:
# - Be compatible with the new WP version used in the “Tested up to” flag.
# - Be tracked on https://www.codevitals.run/project/woo for all existing
# metrics.
BASE_SHA=3d7d7f02017383937f1a4158d433d0e5d44b3dc9
echo "WP_VERSION: $WP_VERSION"
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
pnpm --filter="compare-perf" run compare perf $GITHUB_SHA 19f3d0884617d7ecdcf37664f648a51e2987cada --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
pnpm --filter="compare-perf" run compare perf $GITHUB_SHA $BASE_SHA --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
echo "Publish results to CodeVitals"
title "Publish results to CodeVitals"
COMMITTED_AT=$(git show -s $GITHUB_SHA --format="%cI")
pnpm --filter="compare-perf" run log $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA 19f3d0884617d7ecdcf37664f648a51e2987cada $COMMITTED_AT
pnpm --filter="compare-perf" run log $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT
else
echo "Unsupported event: $GITHUB_EVENT_NAME"
fi

View File

@ -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

View File

@ -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": [
@ -244,7 +244,7 @@
"@woocommerce/block-library",
"**"
],
"pinVersion": "^9.7.0"
"pinVersion": "^10.1.0"
},
{
"dependencies": [
@ -253,7 +253,7 @@
"packages": [
"**"
],
"pinVersion": "wp-6.4"
"pinVersion": "wp-6.6"
},
{
"dependencies": [

View File

@ -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

View File

@ -1,5 +1,344 @@
== Changelog ==
= 9.2.2 2024-08-22 =
**WooCommerce**
* Fix - Revert PR#48731 to address possible issues with plugins using WC's bundled select2 package. [#50854](https://github.com/woocommerce/woocommerce/pull/50854)
* Fix - Partially revert PR#48709 as it could cause issues for some users of the REST API system_status endpoint. [#50881](https://github.com/woocommerce/woocommerce/pull/50881)
= 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 +347,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 +6239,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 +7047,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 +7189,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 +7600,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 +7713,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 +8385,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 +8697,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 +8719,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 +8981,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 +9022,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.

View File

@ -3,7 +3,7 @@
"MD003": { "style": "atx" },
"MD007": { "indent": 4 },
"MD013": { "line_length": 9999 },
"MD024": { "allow_different_nesting": true },
"MD024": { "siblings_only": true },
"MD033": { "allowed_elements": ["video"] },
"MD035": false,
"MD041": false,

View File

@ -0,0 +1,5 @@
---
category_title: Block Theme Development
category_slug: block-theme-development
post_title: Block theme development
---

View File

@ -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 -->

View File

@ -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`
\&gt;700px | `is-large`
521px-700px | `is-medium`
401px-520px | `is-small`
<=400px | `is-mobile`
&lt;=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 (`&lt;a&gt;`) but display it as a button. Or the other way around, a `&lt;button&gt;` 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 `&lt;button&gt;` 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)

View File

@ -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).

View File

@ -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:

View File

@ -617,7 +617,7 @@ You can use the `woocommerce_get_default_value_for_{$key}` filters to provide a
```php
add_filter(
"woocommerce_blocks_get_default_value_for_my-plugin-namespace/address-field",
"woocommerce_get_default_value_for_my-plugin-namespace/address-field",
function ( $value, $group, $wc_object ) {
if ( 'billing' === $group ) {
@ -633,7 +633,7 @@ add_filter(
);
add_filter(
"woocommerce_blocks_get_default_value_for_my-plugin-namespace/my-other-field",
"woocommerce_get_default_value_for_my-plugin-namespace/my-other-field",
function ( $value, $group, $wc_object ) {
$my_plugin_key = 'existing_order_field_key';

View File

@ -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 -->

View File

@ -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 doesnt 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 dont find `$this->supports` in the plugin files, that may mean that the payment method isnt 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.

View File

@ -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 themes 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 stores 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 themes 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 themes 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. Its 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

View File

@ -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 themes `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.

View File

@ -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 themes `functions.php`, or via a plugin that allows custom functions to be added. Please dont add custom code directly to a parent themes `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 its 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 its 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

View File

@ -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 stores location (address) by default, and not the customers 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 shops 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 youd 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/).

View File

@ -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:

View File

@ -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 wont 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:

View File

@ -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 sites `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 `/* Thats 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 );
/* Thats 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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -7,21 +7,27 @@ tags: reference
When developing for WordPress and WooCommerce, it's important to consider the nature and permanence of your data. This will help you decide the best way to store it. Here's a quick primer:
## Transients
If the data may not always be present (i.e., it expires), use a [transient](https://developer.wordpress.org/apis/handbook/transients/). Transients are a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted.
## WP Cache
If the data is persistent but not always present, consider using the [WP Cache](https://developer.wordpress.org/reference/classes/wp_object_cache/). The WP Cache functions allow you to cache data that is computationally expensive to regenerate, such as complex query results.
## wp_options Table
If the data is persistent and always present, consider the [wp_options table](https://developer.wordpress.org/apis/handbook/options/). The Options API is a simple and standardized way of storing data in the wp_options table in the WordPress database.
## Post Types
If the data type is an entity with n units, consider a [post type](https://developer.wordpress.org/post_type/). Post types are "types" of content that are stored in the same way, but are easy to distinguish in the code and UI.
## Taxonomies
If the data is a means of sorting/categorizing an entity, consider a [taxonomy](https://developer.wordpress.org/taxonomy/). Taxonomies are a way of grouping things together.
## Logging
Logs should be written to a file using the [WC_Logger](https://woocommerce.com/wc-apidocs/class-WC_Logger.html) class. This is a simple and standardized way of recording events and errors for debugging purposes.
Remember, the best method of data storage depends on the nature of the data and how it will be used in your application.

View File

@ -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 ) {

View File

@ -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/).

View File

@ -0,0 +1,5 @@
---
category_title: Product Collection Block
category_slug: product-collection
post_title: Product collection block
---

View File

@ -0,0 +1,29 @@
---
post_title: DOM Events sent from product collection block
menu_title: DOM Events
tags: how-to
---
# Product Collection - DOM Events
## `wc-blocks_product_list_rendered`
This event is triggered when Product Collection block was rendered or re-rendered (e.g. due to page change).
### `detail` parameters
| Parameter | Type | Default value | Description |
| ------------------ | ------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `collection` | string | `undefined` | Collection type. It's `undefined` for "create your own" collections as the type is not specified. For other Core collections it can be one of type: `woocommerce/product-collection/best-sellers`, `woocommerce/product-collection/featured`, `woocommerce/product-collection/new-arrivals`, `woocommerce/product-collection/on-sale`, `woocommerce/product-collection/top-rated`. For custom collections it will hold their name. |
### Example usage
```javascript
window.document.addEventListener(
'wc-blocks_product_list_rendered',
( e ) => {
const { collection } = e.detail;
console.log( collection ) // -> collection name, e.g. woocommerce/product-collection/on-sale
}
);
```

View File

@ -1,6 +1,12 @@
---
post_title: Registering custom collections in product collection block
menu_title: Registering custom collections
tags: how-to
---
# Register Product Collection
The `__experimentalRegisterProductCollection` function is part of the `@woocommerce/blocks-registry` package. This function allows 3PDs to register a new collection. This function accepts most of the arguments that are accepted by [Block Variation](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-variations/#defining-a-block-variation).
The `__experimentalRegisterProductCollection` function is part of the `@woocommerce/blocks-registry` package. This function allows third party developers to register a new collection. This function accepts most of the arguments that are accepted by [Block Variation](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-variations/#defining-a-block-variation).
> [!WARNING]
> It's experimental and may change in the future. Please use it with caution.
@ -34,8 +40,8 @@ A Collection is defined by an object that can contain the following fields:
- `title` (type `string`): The title of the collection, which will be displayed in various places including the block inserter and collection chooser.
- `description` (optional, type `string`): A human-readable description of the collection.
- `innerBlocks` (optional, type `Array[]`): An array of inner blocks that will be added to the collection. If not provided, the default inner blocks will be used.
- `isDefault`: ⚠️ It's set to `false` for all collections. 3PDs doesn't need to pass this argument.
- `isActive`: ⚠️ It will be managed by us. 3PDs doesn't need to pass this argument.
- `isDefault`: It's set to `false` for all collections. Third party developers don't need to pass this argument.
- `isActive`: It will be managed by us. Third party developers don't need to pass this argument.
- `usesReference` (optional, type `Array[]`): An array of strings specifying the required reference for the collection. Acceptable values are `product`, `archive`, `cart`, and `order`. When the required reference isn't available on Editor side but will be available in Frontend, we will show a preview label.
### Attributes
@ -91,7 +97,7 @@ The `preview` attribute is optional, and it is used to set the preview state of
- `attributes` (type `object`): The current attributes of the collection.
- `location` (type `object`): The location of the collection. Accepted values are `product`, `archive`, `cart`, `order`, `site`.
For more info, you may check PR #46369, in which the Preview feature was added
For more info, you may check [PR #46369](https://github.com/woocommerce/woocommerce/pull/46369), in which the Preview feature was added
## Examples

View File

@ -6,4 +6,4 @@ post_title: Product Editor
Discover how to customize the WooCommerce product editor, from extending product data to adding unique functionalities.
This handbook is a guide for extension developers looking to add support for the new product editor in their extensions. The product editor uses [Gutenberg's Block Editor](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-editor), which is going to help WooCommerce evolve alongside the WordPress ecosystem.
This handbook is a guide for extension developers looking to add support for the new product editor in their extensions. The product editor uses [Gutenberg's Block Editor](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-editor), which is going to help WooCommerce evolve alongside the WordPress ecosystem.

View File

@ -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' => [

View File

@ -4,4 +4,4 @@ category_slug: quality-and-best-practices
post_title: Quality and best practices
---
Ensuring the quality of your WooCommerce projects is essential. This section will delve into quality exoectations, best practices, coding standards, and other methodologies to ensure your projects stand out in terms of reliability, efficiency, user experience, and more.
Ensuring the quality of your WooCommerce projects is essential. This section will delve into quality expectations, best practices, coding standards, and other methodologies to ensure your projects stand out in terms of reliability, efficiency, user experience, and more.

View File

@ -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 |

View File

@ -0,0 +1,19 @@
---
category_title: Review Guidelines
category_slug: review-guidelines
post_title: Review Guidelines
---
Reviews are an integral part of the online shopping experience, and people installing software pay attention to them. Prospective users of your extensions will likely consider average ratings when making software choices.
Many of today's most popular online review platforms - from Yelp business reviews, to Amazon product reviews - have a range of opinion that can be polarized, with many extremely positive and/or negative reviews, and fewer moderate opinions. This creates a "J-shaped" distribution of reviews that isn't as accurate or as helpful as could be.
WooCommerce.com and WordPress.org both feature reviews heavily, and competing extensions having a higher rating likely have the edge in user choice.
## Primary considerations around reviews
Requesting more reviews for a extension with major issues will not generate good reviews, and analyzing existing reviews will help surface areas to address before soliciting reviews.
It is extremely rare for users of WordPress plugins to leave reviews organically (.2% of users for WordPress.org leave reviews), which means that there's an untapped market of 99.8% of users of the average plugin.
These plugins are competing with other plugins on the same search terms in the WordPress.org plugin directory, and ratings are a large factor in the ranking algorithm. This is not usually a factor to the same extent on the WooCommerce Marketplace. For instance, WooCommerce's PayPal extension directly competes on all possible keywords with other PayPal extensions on the WordPress.org repository, while it does not compete with other PayPal payments extensions on the Marketplace.

View File

@ -0,0 +1,39 @@
---
post_title: How to request WooCommerce extension reviews
menu_title: Requesting reviews
---
## Methods of requesting reviews
### Admin notices
Admin notices are an industry standard method of requesting reviews, but bombarding the admin dashboard with admin notices is not effective. We recommend using restraint in the design of a notice, as well as limiting to a single notice at a time. It's very easy to overwhelm merchants with too many notices, or too intrusive notices.
#### Recommendations
* A good place for an admin notice to review an extension would be to show on the `Plugins` page and extension's settings pages.
* Include a snooze option (or multiple) on your notices with a clear expectation of when the notice will reappear.
* Admin notices should always be always be completely dismissable. They cannot only have a snooze option.
* The options presented in the notice must be phrased carefully to avoid manipulative language.
* Use consistently designed notices so the request for reviews feels like a part of your extension, and looks consistent with WooCommerce's design.
### Direct contact
#### Recommendations
* The most direct route to requesting reviews with the highest chance of being positive is to contact the customer when they are the happiest with the product.
* This can be milestone or time based, following the timing guidelines below.
* The best method for this is either an email or other direct exchange (support chat, call, etc.). This has the highest conversion rate, especially when timed properly so that the customer is happiest.
* This is also extremely effective when you are able to request feedback from specifically qualified merchants, such as merchants that have processed a certain amount with your platform, or who have shipped their first 100 orders using your fulfillment extension, or similar.
* Direct outreach is most likely to be successful if you have ways of targeting users for review requests (merchant account / usage info, etc.), as well as ways to gather the reviews, like sales or marketing teams able to email/call/chat with merchants.
## Messaging for requesting reviews
One method of requesting feedback that we recommend is using the NPS style of review solicitation. This can allow for an increase positive reviews as well as providing the opportunity to assist merchants that are struggling.
NPS-style reviews first ask the user how they rate the product (out of 5 stars), then route them based on their response:
* If they click 4 or 5 stars, ask them to leave a review.
* If they click 1, 2 or 3, tell them we're here to help & ask them to submit a support ticket.
Merchants are significantly more likely to leave a review after a positive support interaction with a support rep who explicitly asked for a review. The language "the best way to thank me is to leave a 5 star review that mentions me in it" or similar tends to work very well - people are more willing to help a person than a produc or company.

View File

@ -0,0 +1,14 @@
---
post_title: Miscellaneous guidelines and advice
menu_title: Miscellaneous guidelines
---
Contributors' names matching search terms directly will rank extremely highly on the WordPress.org plugin repo, which means that having a WordPress.org user named after your business (if that's a search term for your plugin) could tilt the scales over a competing plugin.
Constant nags and overwhelming the admin dashboard with unnecessary alerts detract from your user experience.
You can request to have reviews that are not actually feedback removed. Where this might be applicable is if the request is a simple support request, where it's obviously in the wrong spot. 1 star reviews, even if aggressive or angry, are not usually removed.
Reply to reviews! Thank the giver for offering feedback, acknowledge the issue if needed, ask for more specific feedback, or provide an update when that feedback is addressed! Your reviews are a great window into what your extension's users are actually thinking.
Having folks close to the extension's development (think developers and project managers) looking at reviews on a regular basis is a good way to ensure the customers voice is heard. 1 star reviews are among the most useful, as long as the issue is understood and addressed (if needed).

View File

@ -0,0 +1,18 @@
---
post_title: Notifying users about bug fixes and feature requests
menu_title: Notifying users about bug fixes and feature requests
---
A bug or a missing feature can be a showstopper for merchants. Bugs that pile up or popular features that are not implemented can lead to negative reviews and/or merchants churning and looking at a competitive solution.
Bugs are usually reported via support or GitHub, or you can discover them yourselves in testing.
When a critical bug is found, resolve it within a couple of days (most critical bugs should be resolved within 24 hours) and release a new plugin version promptly. Part of your release process should be to notify all stakeholders (the support team and the merchant affected) about the upcoming release.
Even though a critical bug is a great source of stress for merchants, a quick resolution makes merchants feel heard and supported - having a reliable business partner, who is keen to help in the most difficult situation, helps build a stronger relationship. Therefore, we usually ask merchants for a 5* review when we deliver a fast solution.
When you implement a new feature request and ship a new plugin version, you can follow a similar approach to bugs:
* Notify all stakeholders.
* Update the relevant request in the Feature Requests board, by sharing a public update and marking it as 'Completed'.
* For breaking releases: communicating with your marketing/relations teams to publish updates/newsletters before the release.

View File

@ -0,0 +1,33 @@
---
post_title: How to respond to negative WooCommerce extension reviews
menu_title: Responding to negative reviews
---
An unpleasant event in the merchant's journey can lead them to leave a public, negative review. These events usually are:
* a problem with the product,
* a missing product feature,
* an unhelpful reply,
* long wait times to receive a reply, or;
* combinations of the above.
When receiving a negative review, your goal should always be to turn this review around - this sounds tough, but it is really rewarding.
In the majority of cases, merchants who leave a negative review have first tried contacting support for help. This is useful knowledge, as we can read through the conversation history, understand the issue the merchant experienced and share more details with them when we reach out, even from our first reply.
The process we have seen work well is:
* Create a new response (via email, or on a public review) with subject: Regarding your recent review for xxx.
* Start by introducing yourself, for example: "Hey there, This is Andrew from the team that develops xxx".
* Use empathetic language and make it clear that this negative review had an impact on you. For example, "I read your recent review for xxx and I am worried to hear that an issue is preventing you from using this plugin as you had in mind. I'd be happy to help you resolve this!".
Compare the above sentence with: "I am sorry to hear that you experienced an issue with xxx". "I am sorry to" indicates that you are saddened by an event, but don't necessarily plan to do something about it. In comparison, in "I am worried to hear", worry indicates action. Additionally, "That you experienced an issue" can be interpreted as if the problem is mainly the merchant's fault, whereas language like "an issue is preventing you from using this plugin as you had in mind. I'd be happy to help you resolve this!" implies you and the merchant are on the same team.
* Share more details, a solution, an idea, a suggestion or an explanation.
* Urge the merchant to update the review, by highlighting how important reviews are for our team and for other merchants. Example language to do this is "We would appreciate it if you could take a couple of minutes to update your review and describe your experience with our product and support. Honest reviews are extremely helpful for other merchants who try to decide if a plugin is a right fit for them. Thank you for your contribution!".
* Include a direct link to the reviews section, so merchants can easily navigate there and change their review.
* On a follow-up communication, if the merchant has changed the review, consider saying something like: "I shared this with the rest of the team and it made everyone's day".
If the above things are true, sharing some of your procedures with merchants (highlighting how your team emphasizes and thrives on feedback) helps ensure merchants feel like you are part of their team and builds a strong relationship with them.
Even a merchant that doesn't change their review can offer a mutually beneficial discussion by learning more about their setup and offering some suggestions. These conversations help grow merchants' trust.

View File

@ -0,0 +1,31 @@
---
post_title: Utilizing WooCommerce extension feature requests
menu_title: Utilizing feature requests
---
It is important to keep track of all feature requests, and have some sort of system of record where anyone can see what kind of feedback the product is receiving over time.
We recommend a daily or bi-daily check-in, where you:
* triage new feature requests,
* celebrate positive reviews and;
* act upon negative reviews.
Carefully maintaining feature request boards (or similar system) is key, as the average board contains a lot of duplicate/spam content, requests about features that have been implemented and requests about features that will likely never be implemented. Poorly maintained boards make merchants feel unheard/neglected.
This results in more negative reviews on the premise that the product teams were not reading/listening to their feedback.
We've seen good results with the following procedures:
Starting with the most affected products, go through all open requests, reply to most/all of them and categorize them as:
* "Open", for requests that we still want more feedback,
* "Planned", for requests that we plan to implement,
* "Completed", for requests that have already been implemented and;
* "Closed", for requests that we do not plan to implement, as they are not a good fit for the product, for duplicate/spam requests and for requests that were actually support questions.
Replying to all "Open" requests is the goal, but if that's not attainable currently, make sure to reply to 100% of the requests that are closed.
For new open requests that arrive as a feature request, discuss/triage them, reply promptly, and assign a status to avoid having the board become unmanaged, and ensure merchants feel (and are) heard.
In addition to the effect a tidy board has on merchants, it also helps product teams better understand which requests are most wanted and most impactful and then plan work accordingly.

View File

@ -0,0 +1,18 @@
---
post_title: Utilizing your support team to respond to feedback
menu_title: Utilizing your support team
---
Your support team is usually the primary contact point of merchants when they contact you. Tickets and chats are the best tools we have to converse with merchants, understand pain-points about our software, listen to their feedback and analyze their feature requests. Collectively, support teams have a great understanding of the products and how people use them. This information is essential to be transferred over to product and engineering teams.
We recommend that you take the following steps to best utilize your support team:
* Create a strict internal SLA where support team requests are answered by product or engineering teams.
* Ensure you have a way for your support team to effectively report bugs to your product and engineering teams.
* When responding to your support team, avoid super-short answers, and try to explain the answer simply and concisely. This will allow the support agent to copy/paste your answer to the merchant.
* Avoid replying with statements like "no, this is not possible" or "no, this feature will not be implemented" without providing additional context about technical or product limitations.
* Regularly dedicate additional time to implement a short custom code snippets or to provide in-depth technical details about how a custom project would be implemented so that merchants can reach a solution faster if they decide to hire a dedicated WooCommerce developer. A small effort can go a long way to amaze merchants and reveal an opportunity to request a 5 star review.
* Keep support in the loop when they report a bug or request a new feature. When you release a new product version, we always consider the impact it can have on support.
* Work closely with your support team. For example, consider having a feedback hangout call every month where you can discuss product feedback and planned improvements.
With these kinds of practices in place, support teams are more willing to share feedback, issues, concerns, and questions with us. This helps maintain a closer relationship with merchants and identify pain-points early, before they become a reason for them to churn.

View File

@ -0,0 +1,24 @@
---
post_title: When to request WooCommerce extension reviews
menu_title: When to request reviews
---
The best approach to increasing our top-star reviews is to identify key moments in the merchant's journey, when they are more likely to leave a review and actively request for it.
The most distinct moments for most of our use cases are:
* When merchants feel helpless, lost, frustrated and we are able to help,
* When merchants find a bug in our code and we quickly ship a fix,
* When merchants need a feature and we notify them when it is shipped,
* When merchants feel alone and we make them feel heard and;
* When merchants contact with a question and we go out of our way to provide them with top-notch support, even if this means slightly stepping outside the official boundaries of a support policy.
Think about who is seeing the review request, and what they are doing at that time. Showing a request to a fulfillment worker just trying to ship an order isn't likely going to work well.
Outreach after a milestone works really well. Some language we've used before is "Congratulations on your xxth sale! We're delighted that WooPayments facilitated this milestone. Would you consider sharing your experience and encouraging others by reviewing our extension?".
Another way to optimally time a review request would be to setup a prompt that aligns with use patterns. For instance, if you know that most of your merchants use your extension daily, you would likely send a review request sooner than a extension that most merchants interact very sparingly with.
SaaS/Connector extensions need to be particularly careful about requesting ratings correctly, as they are the most likely to be overlooked unless there is an issue, leading to skewed ratings not representative of the actual extension.
Consider requesting feedback at the end of every single support interaction, especially in the WordPress.org support forums. One of the largest barriers to leaving a review is the requirement of a user being logged into WooCommerce.com (or WordPress.org), and the WordPress.org support forums present a good opportunity to gather these reviews. By being highly responsive in the public support forum and solving issues there, users are already logged in and able to immediately leave a review (after being requested to!).

View File

@ -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

View File

@ -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.

View File

@ -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).

View File

@ -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&amp;image_crop_resized=960x540&amp;image_play_button=1&amp;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.
---

View File

@ -3,10 +3,10 @@
"title": "WooCommerce Monorepo",
"description": "Monorepo for the WooCommerce ecosystem",
"homepage": "https://woocommerce.com/",
"packageManager": "pnpm@^9.1.0",
"packageManager": "pnpm@9.1.3",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"private": true,
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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",

View File

@ -5,7 +5,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"scripts": {
"e2e": "jest",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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",

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add AnalyticsError component.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Removed defaultProps from React functional components since they will be deprecated for React 19

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Mark props with defaults as not required 

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Fixed missing styles on TreeSelectControl by copying from @wordpress/components/CheckboxControl and importing @wordpress/base-styles

View File

@ -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",

View File

@ -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

View File

@ -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;

View File

@ -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,
};

View File

@ -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>
`;

View File

@ -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();
} );
} );

View File

@ -0,0 +1 @@
export { default as AnalyticsError } from './error';

View File

@ -9,17 +9,17 @@ import { uniqueId, noop } from 'lodash';
import PropTypes from 'prop-types';
const DateInput = ( {
disabled,
disabled = false,
value,
onChange,
dateFormat,
label,
describedBy,
error,
onFocus,
onBlur,
onKeyDown,
errorPosition,
onFocus = () => {},
onBlur = () => {},
onKeyDown = noop,
errorPosition = 'bottom center',
} ) => {
const classes = classnames( 'woocommerce-calendar__input', {
'is-empty': value.length === 0,
@ -73,12 +73,4 @@ DateInput.propTypes = {
onKeyDown: PropTypes.func,
};
DateInput.defaultProps = {
disabled: false,
onFocus: () => {},
onBlur: () => {},
errorPosition: 'bottom center',
onKeyDown: noop,
};
export default DateInput;

View File

@ -15,7 +15,12 @@ import { createElement } from '@wordpress/element';
* @param {string} props.visibleFormat
* @return {Object} -
*/
const Date = ( { date, machineFormat, screenReaderFormat, visibleFormat } ) => {
const Date = ( {
date,
machineFormat = 'Y-m-d H:i:s',
screenReaderFormat = 'F j, Y',
visibleFormat = 'Y-m-d',
} ) => {
return (
<time dateTime={ formatDate( machineFormat, date ) }>
<span aria-hidden="true">
@ -48,10 +53,4 @@ Date.propTypes = {
visibleFormat: PropTypes.string,
};
Date.defaultProps = {
machineFormat: 'Y-m-d H:i:s',
screenReaderFormat: 'F j, Y',
visibleFormat: 'Y-m-d',
};
export default Date;

View File

@ -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';

View File

@ -22,7 +22,11 @@ import Menu from './menu';
* @param {string} props.label
* @return {Object} -
*/
const SummaryList = ( { children, isDropdownBreakpoint, label } ) => {
const SummaryList = ( {
children,
isDropdownBreakpoint,
label = __( 'Performance Indicators', 'woocommerce' ),
} ) => {
const items = children( {} );
// We default to "one" because we can't have empty children.
const itemCount = Children.count( items ) || 1;
@ -79,10 +83,6 @@ SummaryList.propTypes = {
label: PropTypes.string,
};
SummaryList.defaultProps = {
label: __( 'Performance Indicators', 'woocommerce' ),
};
export default withViewportMatch( {
isDropdownBreakpoint: '< large',
} )( SummaryList );

View File

@ -39,18 +39,18 @@ import { Text } from '../experimental';
const SummaryNumber = ( {
children,
delta,
href,
hrefType,
isOpen,
href = '',
hrefType = 'wc-admin',
isOpen = false,
label,
labelTooltipText,
onToggle,
prevLabel,
prevLabel = __( 'Previous period:', 'woocommerce' ),
prevValue,
reverseTrend,
selected,
reverseTrend = false,
selected = false,
value,
onLinkClickCallback,
onLinkClickCallback = noop,
} ) => {
const liClasses = classnames( 'woocommerce-summary__item-container', {
'is-dropdown-button': onToggle,
@ -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).
@ -238,14 +237,4 @@ SummaryNumber.propTypes = {
onLinkClickCallback: PropTypes.func,
};
SummaryNumber.defaultProps = {
href: '',
hrefType: 'wc-admin',
isOpen: false,
prevLabel: __( 'Previous period:', 'woocommerce' ),
reverseTrend: false,
selected: false,
onLinkClickCallback: noop,
};
export default SummaryNumber;

View File

@ -13,9 +13,16 @@ import { createElement } from '@wordpress/element';
import TimelineGroup from './timeline-group';
import { sortByDateUsing, groupItemsUsing } from './util';
const Timeline = ( props ) => {
const { className, items, groupBy, orderBy, dateFormat, clockFormat } =
props;
const Timeline = ( {
className = '',
items = [],
groupBy = 'day',
orderBy = 'desc',
/* translators: PHP date format string used to display dates, see php.net/date. */
dateFormat = __( 'F j, Y', 'woocommerce' ),
/* translators: PHP clock format string used to display times, see php.net/date. */
clockFormat = __( 'g:ia', 'woocommerce' ),
} ) => {
const timelineClassName = classnames( 'woocommerce-timeline', className );
// Early return in case no data was passed to the component.
@ -92,7 +99,7 @@ Timeline.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
),
/**
* Defines how items should be grouped together.
*/
@ -111,16 +118,5 @@ Timeline.propTypes = {
clockFormat: PropTypes.string,
};
Timeline.defaultProps = {
className: '',
items: [],
groupBy: 'day',
orderBy: 'desc',
/* translators: PHP date format string used to display dates, see php.net/date. */
dateFormat: __( 'F j, Y', 'woocommerce' ),
/* translators: PHP clock format string used to display times, see php.net/date. */
clockFormat: __( 'g:ia', 'woocommerce' ),
};
export { orderByOptions, groupByOptions } from './util';
export default Timeline;

View File

@ -11,8 +11,12 @@ import { createElement } from '@wordpress/element';
import TimelineItem from './timeline-item';
import { sortByDateUsing } from './util';
const TimelineGroup = ( props ) => {
const { group, className, orderBy, clockFormat } = props;
const TimelineGroup = ( {
group = { title: '', items: [] },
className = '',
orderBy = 'desc',
clockFormat,
} ) => {
const groupClassName = classnames(
'woocommerce-timeline-group',
className
@ -90,8 +94,8 @@ TimelineGroup.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
} ).isRequired,
),
} ),
/**
* Defines how items should be ordered.
*/
@ -102,13 +106,4 @@ TimelineGroup.propTypes = {
clockFormat: PropTypes.string,
};
TimelineGroup.defaultProps = {
className: '',
group: {
title: '',
items: [],
},
orderBy: 'desc',
};
export default TimelineGroup;

View File

@ -6,9 +6,7 @@ import { format } from '@wordpress/date';
import PropTypes from 'prop-types';
import { createElement } from '@wordpress/element';
const TimelineItem = ( props ) => {
const { item, className, clockFormat } = props;
const TimelineItem = ( { item = {}, className = '', clockFormat } ) => {
const itemClassName = classnames( 'woocommerce-timeline-item', className );
const itemTimeString = format( clockFormat, item.date );
@ -71,12 +69,7 @@ TimelineItem.propTypes = {
* The PHP clock format string used to format times, see php.net/date.
*/
clockFormat: PropTypes.string,
} ).isRequired,
};
TimelineItem.defaultProps = {
className: '',
item: {},
} ),
};
export default TimelineItem;

View File

@ -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;
}
}
}

View File

@ -17,7 +17,7 @@ import Tag from '../tag';
* @param {Array} props.items
* @return {Object} -
*/
const ViewMoreList = ( { items } ) => {
const ViewMoreList = ( { items = [] } ) => {
return (
<Tag
className="woocommerce-view-more-list"
@ -49,8 +49,4 @@ ViewMoreList.propTypes = {
items: PropTypes.arrayOf( PropTypes.node ),
};
ViewMoreList.defaultProps = {
items: [],
};
export default ViewMoreList;

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -5,7 +5,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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": {

View File

@ -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' );
} );
} );

View File

@ -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;
}
/**

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -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": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update user preferences types and logic

Some files were not shown because too many files have changed in this diff Show More