Merge branch 'fix/30594-api-key-description-length' of github.com:woocommerce/woocommerce into fix/30594-api-key-description-length

This commit is contained in:
Jeff Stieler 2021-10-20 08:38:03 -04:00
commit 889022597d
1699 changed files with 59386 additions and 43985 deletions

View File

@ -22,3 +22,6 @@ trim_trailing_whitespace = false
trim_trailing_whitespace = false trim_trailing_whitespace = false
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
[*.json]
indent_style = tab

View File

@ -1,21 +1 @@
*.min.js node_modules
/assets/js/accounting/**
/assets/js/flexslider/**
/assets/js/jquery-blockui/**
/assets/js/jquery-cookie/**
/assets/js/jquery-flot/**
/assets/js/jquery-payment/**
/assets/js/jquery-qrcode/**
/assets/js/jquery-serializejson/**
/assets/js/jquery-tiptip/**
/assets/js/jquery-ui-touch-punch/**
/assets/js/js-cookie/**
/assets/js/photoswipe/**
/assets/js/prettyPhoto/**
/assets/js/round/**
/assets/js/select2/**
/assets/js/selectWoo/**
/assets/js/stupidtable/**
/assets/js/zeroclipboard/**
/assets/js/zoom/**

View File

@ -1,31 +1,3 @@
/** @format */
module.exports = { module.exports = {
root: true, extends: ["plugin:@woocommerce/eslint-plugin/recommended"],
env: {
browser: true,
es6: true,
node: true
},
globals: {
wp: true,
wpApiSettings: true,
wcSettings: true,
es6: true
},
rules: {
camelcase: 0,
indent: 0,
'max-len': [ 2, { 'code': 140 } ],
'no-console': 1
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
modules: true,
experimentalObjectRestSpread: true,
jsx: true
}
},
}; };

View File

@ -4,6 +4,10 @@ on:
branches: branches:
- trunk - trunk
- 'release/**' - 'release/**'
defaults:
run:
shell: bash
working-directory: plugins/woocommerce
jobs: jobs:
test: test:
name: PHP ${{ matrix.php }} WP ${{ matrix.wp }} name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}

View File

@ -1,6 +1,5 @@
name: Build zip for PR name: Build zip for PR
on: on: pull_request
pull_request
jobs: jobs:
build: build:
name: Build zip for PR name: Build zip for PR
@ -11,7 +10,7 @@ jobs:
- name: Build - name: Build
id: build id: build
uses: woocommerce/action-build@v2 uses: woocommerce/action-build@test-cd-after-npm-install
- name: Upload PR zip - name: Upload PR zip
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -25,9 +24,8 @@ jobs:
e2e-tests-run: e2e-tests-run:
name: Runs E2E tests. name: Runs E2E tests.
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
needs: [ build ] needs: [build]
steps: steps:
- name: Create dirs. - name: Create dirs.
run: | run: |
mkdir -p code/woocommerce mkdir -p code/woocommerce
@ -41,15 +39,15 @@ jobs:
path: package/woocommerce path: package/woocommerce
- name: Run npm install. - name: Run npm install.
working-directory: package/woocommerce working-directory: package/woocommerce/plugins/woocommerce
run: npm install run: npm install
- name: Load docker images and start containers. - name: Load docker images and start containers.
working-directory: package/woocommerce working-directory: package/woocommerce/plugins/woocommerce
run: npx wc-e2e docker:up run: npx wc-e2e docker:up
- name: Move current directory to code. We will install zip file in this dir later. - name: Move current directory to code. We will install zip file in this dir later.
run: mv ./package/woocommerce/* ./code/woocommerce run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
- name: Download WooCommerce ZIP. - name: Download WooCommerce ZIP.
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
@ -61,7 +59,7 @@ jobs:
working-directory: tmp working-directory: tmp
run: | run: |
unzip woocommerce.zip -d woocommerce unzip woocommerce.zip -d woocommerce
mv woocommerce/woocommerce/* ../package/woocommerce/ mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
- name: Run tests command. - name: Run tests command.
working-directory: code/woocommerce working-directory: code/woocommerce

View File

@ -1,6 +1,10 @@
name: Run code coverage on PR name: Run code coverage on PR
on: on:
pull_request pull_request
defaults:
run:
shell: bash
working-directory: plugins/woocommerce
jobs: jobs:
test: test:
name: Code coverage (PHP 7.4, WP Latest) name: Code coverage (PHP 7.4, WP Latest)

View File

@ -1,6 +1,10 @@
name: Run code sniff on PR name: Run code sniff on PR
on: on:
pull_request pull_request
defaults:
run:
shell: bash
working-directory: plugins/woocommerce
jobs: jobs:
test: test:
name: Code sniff (PHP 7.4, WP Latest) name: Code sniff (PHP 7.4, WP Latest)

View File

@ -1,6 +1,10 @@
name: Run unit tests on PR name: Run unit tests on PR
on: on:
pull_request pull_request
defaults:
run:
shell: bash
working-directory: plugins/woocommerce
jobs: jobs:
test: test:
name: PHP ${{ matrix.php }} WP ${{ matrix.wp }} name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}

104
.gitignore vendored
View File

@ -1,84 +1,34 @@
# Editors # Operating System files
project.xml
project.properties
/nbproject/private/
.buildpath
.project
.settings*
.idea
.vscode
.eslintcache
*.sublime-project
*.sublime-workspace
.sublimelinterrc
*.swp
# Grunt
node_modules/
none
# Sass
.sass-cache/
# Compiled CSS
/assets/css/*.css
/assets/css/photoswipe/**/*.min.css
# Minified JS
/assets/js/**/*.min.js
# OS X metadata
.DS_Store .DS_Store
# Windows junk
Thumbs.db Thumbs.db
# Behat/CLI Tests # IDE files
tests/cli/installer .idea
tests/cli/composer.phar .vscode/
tests/cli/composer.lock
tests/cli/composer.json
tests/cli/vendor
# Unit tests # Environment files
/tmp wp-cli.local.yml
/tests/bin/tmp .wp-env.override.json
/tests/e2e/config/local-*.json yarn-error.log
/tests/e2e/config/local.json npm-debug.log
/tests/e2e/config/default.json .pnpm-debug.log
/tests/e2e/env/config/default.json
/tests/e2e/docker
/tests/e2e/env/docker/wp-cli/initialize.sh
/tests/e2e/env/build/
/tests/e2e/env/build-module/
/tests/e2e/screenshots
/tests/e2e/plugins
/tests/e2e/utils/build/
/tests/e2e/utils/build-module/
# Logs # Build files
/logs *.sql
*.swp
*.zip
# Composer # Built packages
/vendor/
/bin/composer/**/vendor/
/lib/vendor/
contributors.md
contributors.html
# Yarn
yarn.lock
# Packages
/packages/*
!/packages/README.md
# Screenshots for e2e tests failures
/screenshots/
# Language files
i18n/languages/woocommerce.pot
# Build
build/ build/
woocommerce.zip build-module/
build-style/
# Project files
node_modules/
vendor/
# TypeScript files
tsconfig.tsbuildinfo
# wp-env config
.wp-env.override.json

3
.prettierrc.js Normal file
View File

@ -0,0 +1,3 @@
// Import the default config file and expose it in the project root.
// Useful for editor integrations.
module.exports = require( '@wordpress/prettier-config' );

11
.wp-env.json Normal file
View File

@ -0,0 +1,11 @@
{
"phpVersion": "7.4",
"core": null,
"plugins": [ "./plugins/woocommerce" ],
"config": {
"JETPACK_AUTOLOAD_DEV": true,
"WP_DEBUG_LOG": true,
"WP_DEBUG_DISPLAY": true,
"ALTERNATE_WP_CRON": true
}
}

120
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,120 @@
# WooCommerce Development Setup with WP-ENV
Docker development setup for WooCommerce with WP-ENV.
## Prerequisites
Please install WP-ENV before getting started. You can find more about WP-ENV on [here](https://github.com/WordPress/gutenberg/tree/master/packages/env).
The following command installs WP-ENV globally.
`npm -g i @wordpress/env`
## Starting WP-ENV
1. Navigate to the root of WooCommerce source code.
2. Start the docker container by running `wp-env start`
You should see the following output
```
WordPress development site started at http://localhost:8888/
WordPress test site started at http://localhost:8889/
MySQL is listening on port 55003
```
The port # might be different depending on your `.wp-env.override.json` configuration.
## Getting Started with Developing
Once you have WP-ENV container up, we need to run a few commands to start developing.
1. Run `npm install` to install npm modules.
2. Run `npm run dev`
3. Run `composer install` to install PHP dependencies.
If you don't have Composer available locally, run the following command. It runs the command in WP-ENV container.
`wp-env run composer composer install`
You might also want to run `npm start` to watch your CSS and JS changes if you are working on the frontend.
You're now ready to develop!
## Using Xdebug
Please refer to [WP-ENV official README](https://github.com/WordPress/gutenberg/tree/master/packages/env#using-xdebug) section for setting up Xdebug.
## Overriding the Default Configuration
The default configuration comes with PHP 7.4, WooCommerce 5.0, and a few WordPress config values.
You can create `.wp-env.override.json` file and override the default configuration values.
You can find more about `.wp-env.override.json` configuration [here](https://github.com/WordPress/gutenberg/tree/master/packages/env#wp-envoverridejson).
**Example: Overriding PHP version to 8.0**
Create `.wp-env.override.json` in the root directory with the following content.
```json
{
"phpVersion": "8.0"
}
```
**Exampe: Adding a locally installed plugin**
Method 1 - Adding to the `plugins` array
Open the default `.wp-env.json` and copy `plugins` array and paste it into the `.wp-env.override.json` and add your locally installed plugin. Copying the default `plugins` is needed as WP-ENV does not merge the values of the `plugins`.
```json
{
"plugins": [
"./plugins/woocommerce",
"https://downloads.wordpress.org/plugin/wp-crontrol.1.10.0.zip"
]
}
```
Method 2 - Adding to the `mappings`
This method is simpler, but the plugin does not get activated on startup. You need to manually activate it yourself on the first startup.
```json
{
"mappings": {
"wp-content/plugins/wp-crontrol": "../woocommerce"
}
}
```
## Accessing MySQL
The MySQL port can change when you restart your container.
You can get the current MySQL port from the output of `wp-env start` command.
1. Open your choice of MySQL tool.
2. Use the following values to access the MySQL container.
3. You can omit the username and password.
| Name | Value |
| -------- | --------------------- |
| Host | 127.0.0.1 |
| Username | |
| Password | |
| Port | Port from the command |
## HOWTOs
##### How do I ssh into the container?
Run the following command to ssh into the container
`wp-env run wordpress /bin/bash`
You can run a command in the container with the following syntax. You can find more about on the `run` command [here](https://github.com/WordPress/gutenberg/tree/master/packages/env#wp-env-run-container-command)
Syntax:
`wp-env run :container-type :linux-command`

View File

@ -1,5 +1,125 @@
== Changelog == == Changelog ==
= 5.9.0 beta 2021-10-19 =
**WooCommerce**
* Fix - Variable product price caching bug with VAT exemption. #30889
* Fix - Allow to pass null as the email for billing addresses in REST API. #30850
* Fix - Ensure woocommerce_cancel_unpaid_orders event is always re-scheduled. #30830
* Fix - Use a more standard way to check if the product attributes lookup table exists. #30745
* Fix - Undefined variable notice when trying to add product in orders without specifying a product. #30739
* Fix - Use proper location for taxes when adding products via admin. #30692
* Dev - Add mobile data to WCTracker. #30415
* Tweak - Remove hardcode category banners in Settings > Marketplace and use the WooCommerce.com API instead. #30938
* Tweak - Show a search again message when marketplace results are empty. #30642
* Enhancement - Add ratings, reviews and icons into Marketplace's Product Cards. #30840
* Enhancement - Update Storefront banner width and track links in the marketplace page. #30882
* Enhancement - Revamp the WooCommerce Marketplace page. #30900
**WooCommerce Admin - 2.8.0 RC 2**
* Add - Store Profiler and Product task - include Subscriptions. #7734
* Fix - Fixed navigation menu text color after Gutenberg 11.6.0. #7771
* Fix - Add status param to notes/delete/all REST endpoint, to correctly delete all notes. #7743
* Fix - Allow already installed marketing extensions to be activated. #7740
* Fix - Add missing title text for marketing task. #7640
* Fix - Assign parent order status as children order status if refund order. #7253
* Fix - Fix category lookup logic to update children correctly. #7709
* Fix - Fixing an unwanted page refresh when using Woo Navigation. #7615
* Fix - Fix naming of event names and properties. #7677
* Fix - Fix white screen for variation analytic data without a name. #7686
* Update - Update back up copy of free extension for Google Listing & Ads plugin. #7798
* Update - Update Eway payment gateway capitalization (was eWAY). #7678
* Update - Enable Square in France. #7679
* Enhancement - Add experiment for promoting WooCommerce Payments in payment methods table. #7666
**WooCommerce Blocks - 6.0.0 & 6.0.1 & 6.0.2 & 6.1.0**
* Fix - Infinite recursion when removing an attribute filter from the Active filters block. #4816
* Fix - Update All Reviews block so it honors 'ratings enabled' and 'show avatars' preferences. #4764
* Fix - Products by Category: Moved renderEmptyResponsePlaceholder to separate method to prevent unnecessary rerender. #4751
* Fix - Calculation of number of reviews in the Reviews by Category block. #4729
* Fix - Dropdown list in Product Category List Block for nested categories #4920
* Fix - String translations within the All Products Block. #4897
* Fix - Filter By Price: Update aria values to be more representative of the actual values presented. #4839
* Fix - Filter button from Filter Products by Attribute block is not aligned with the input field. #4814
* Fix - Remove IntersectionObserver shim in favor of dropping IE11 support. #4808
* Enhancement - Added global styles to All Reviews, Reviews by Category and Reviews by Product blocks. Now it's possible to change the text color and font size of those blocks. #4323
= 5.8.0 2021-10-12 =
**WooCommerce**
* Add - `modified_before` and `modified_after` filtering parameters to REST API for products, orders and coupons. #30585
* Add - `woocommerce_quantity_input_min_admin` and `woocommerce_quantity_input_step_admin` filters. #30705
* Dev - Action Scheduler updated to 3.3.0. #30719
* Dev - Add order argument to `woocommerce_order_actions` filter. #30475
* Fix - During product quick edit, the featured setting is sometimes not shown correctly as checked. #30639
* Fix - Offsets not calculated correctly sometimes on select2 dropdowns causing usability issues. #30690
* Fix - Select2 dropdown search input not getting focus when select2 dropdown element gets focused. #30626
* Tweak - Add individual item remove notices based on the context of the line item in the order. #30650
* Tweak - Change the shop page summary which was not relevant to the public. #30573
* Tweak - Deleted unneeded double spaces in text strings. #30487
* Tweak - Open Browse all extensions link in a new tab. #30640
**WooCommerce Admin - 2.7.1 & 2.7.2**
* Fix - Fix analytics crashing on daylight saving. #7763
* Fix - Allow super admins all capabilities within WooCommerce Admin. #7489
* Fix - Fix end date for last periods. #6584
* Fix - Fix up onboarding profiler not working when opted out of tracking. #7490
* Fix - Making Business Details sticky in onboarding wizard. #7426
* Fix - Missing RTL for onboarding styles. #7531
* Fix - Skip scheduling action if Action Scheduler tables have not been set up. #7521
* Fix - Update country region typeahead for better autofill support. #7497
* Fix - Use installable extensions for local state versus free extensions. #7585
* Fix - Fix fatal error and unrelated results in analytics. #7682
* Fix - Harden the reports directory. #7691
* Fix - Update task-item logic to only display content when expanded is true. #7611
* Add - Show Pinterest in installed marketing extensions (if installed). #7417
* Add - Added MailchimpScheduler that runs daily to subscribe store_email in the profile data. #7579
* Add - Added shipping plugin recommendations to settings page. #7446
* Add - Adding endpoint to snooze onboarding task. #7539
* Add - Adding undo snooze task endpoint. #7560
* Add - Add task dismissal endpoints. #7538
* Update - Add HK and SG countries to WC Pay intl support. #7558
* Update - Create task list REST API endpoint. #7512
* Update - Deleted OnboardingEmailMarketing note class. #7595
* Update - Removes the use of the depreciated woocommerce_shared_settings hook. #7480
* Update - Removes non WooCommerce Admin specific settings from the `wc_admin` namespace in the `wc/data` settings store (ex: countries). #7480
* Update - Updating eway logo in payment suggestions defaults. #7562
* Update - Update marketing task completion logic. #7586
* Dev - Add email address field to OBW. #7552
* Tweak - Add navigation items for the Marketplace menu. #7529
* Tweak - Change all analytics strings and labels to sentence case. #6501
* Tweak - Delete unneeded double spaces in text strings. #7502
* Tweak - Remove the preloaded onboarding options. #7338
* Tweak - Update analytics card header text styles. #6506
* Enhancement - Align Table fields with the fallback on isNumeric. #7431
**WooCommerce Blocks - 5.7.1 & 5.8.0 & 5.9.0 & 5.9.1**
* Add - Extensibility point for extensions to filter payment methods. #4668
* Add - "Filter Products by Stock" block. #4145
* Add - Introduced the `__experimental_woocommerce_blocks_checkout_update_order_from_request` hook to the Checkout Store API. #4610.
* Fix - Add label element to `<BlockTitle>` component. #4585
* Fix - Disable Cart, Checkout, All Products & filters blocks from the widgets screen.
* Fix - Infinite recursion when removing an attribute filter from the Active filters block. #4816
* Fix - Prevent Product Category List from displaying incorrectly when used on the shop page. #4587
* Fix - Product Search block displaying incorrectly. #4740
* Tweak - Add Extensibility info to Store API readme. #4605
* Tweak - Update documentation for the snackbarNoticeVisibility filter. #4508
* Tweak - Add documentation for `extensionCartUpdate` method - this allows extensions to update the client-side cart after it has been modified on the server. #4377
**Action Scheduler 3.3.0**
* Enhancement - Adds as_has_scheduled_action() to provide a performant way to test for existing actions. #645
* Dev - Now supports queries that use multiple statuses. #649
* Dev - Minimum requirements for WordPress and PHP bumped (to 5.2 and 5.6 respectively). #723
* Fix - Improves compatibility with environments where NO_ZERO_DATE is enabled. #519
* Fix - Adds safety checks to guard against errors when our database tables cannot be created. #645
= 5.7.1 2021-09-23 = = 5.7.1 2021-09-23 =
**WooCommerce** **WooCommerce**

40737
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,147 +1,23 @@
{ {
"name": "woocommerce", "name": "woocommerce-monorepo",
"title": "WooCommerce", "title": "WooCommerce Monorepo",
"version": "5.9.0", "description": "Monorepo for the WooCommerce ecosystem",
"homepage": "https://woocommerce.com/", "homepage": "https://woocommerce.com/",
"private": true,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0+", "author": "Automattic",
"main": "Gruntfile.js", "license": "GPL-3.0-or-later",
"config": { "bugs": {
"wp_org_slug": "woocommerce" "url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"install": " if [ -z \"$SKIP_LERNA_BOOTSTRAP\" ]; then npx lerna bootstrap --hoist; fi",
"check:subset-installed": "npm list --depth 1 install-subset > /dev/null 2>&1",
"install:subset-only": "npm install --no-package-lock --no-save install-subset",
"install:no-e2e": "npm run check:subset-installed --silent || npm run install:subset-only && SKIP_LERNA_BOOTSTRAP=true npx install-subset i no-e2e",
"build": "./bin/build-zip.sh",
"build:core": "grunt && npm run makepot",
"build:dev": "npm run build:core && npm run build:packages",
"build-watch": "grunt watch",
"build:packages": "lerna run build",
"build:zip": "npm run build",
"build:assets": "grunt assets",
"lint:js": "eslint assets/js --ext=js",
"docker:down": "npx wc-e2e docker:down",
"docker:ssh": "npx wc-e2e docker:ssh",
"docker:up": "npx wc-e2e docker:up",
"test:api": "npx wc-api-tests test api",
"make:collection": "npx wc-api-tests make:collection",
"test:e2e": "npx wc-e2e test:e2e",
"test:e2e-debug": "npx wc-e2e test:e2e-debug",
"test:e2e-dev": "npx wc-e2e test:e2e-dev",
"test:unit": "./vendor/bin/phpunit -c ./phpunit.xml",
"makepot": "composer run-script makepot",
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",
"publish-packages": "lerna publish from-package",
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && node ./node_modules/husky/husky.js install"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "7.12.8", "@woocommerce/eslint-plugin": "^1.2.0",
"@babel/core": "7.12.9", "@wordpress/prettier-config": "^1.0.5",
"@babel/polyfill": "7.12.1", "jest": "^27.0.6",
"@babel/preset-env": "7.12.7", "prettier": "npm:wp-prettier@2.2.1-beta-1",
"@babel/register": "7.12.1", "typescript": "4.2.4"
"@typescript-eslint/eslint-plugin": "3.10.1",
"@typescript-eslint/experimental-utils": "3.10.1",
"@typescript-eslint/parser": "3.10.1",
"@woocommerce/admin-e2e-tests": "0.1.1",
"@woocommerce/api": "file:tests/e2e/api",
"@woocommerce/api-core-tests": "file:tests/e2e/api-core-tests",
"@woocommerce/e2e-core-tests": "file:tests/e2e/core-tests",
"@woocommerce/e2e-environment": "file:tests/e2e/env",
"@woocommerce/e2e-utils": "file:tests/e2e/utils",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2",
"@wordpress/eslint-plugin": "7.3.0",
"autoprefixer": "9.8.6",
"babel-eslint": "10.1.0",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"commander": "4.1.1",
"config": "3.3.3",
"cross-env": "6.0.3",
"deasync": "0.1.21",
"eslint": "6.8.0",
"eslint-config-wpcalypso": "5.0.0",
"eslint-plugin-jest": "23.20.0",
"github-contributors-list": "https://github.com/woocommerce/github-contributors-list/tarball/master",
"grunt": "1.3.0",
"grunt-contrib-clean": "2.0.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-cssmin": "3.0.0",
"grunt-contrib-uglify": "4.0.1",
"grunt-contrib-watch": "1.1.0",
"grunt-newer": "^1.3.0",
"grunt-phpcs": "0.4.0",
"grunt-postcss": "0.9.0",
"grunt-rtlcss": "2.0.2",
"grunt-sass": "3.1.0",
"grunt-stylelint": "0.16.0",
"gruntify-eslint": "5.0.0",
"husky": "4.3.0",
"istanbul": "1.0.0-alpha.2",
"jest": "^25.1.0",
"lerna": "3.22.1",
"lint-staged": "9.5.0",
"mocha": "7.2.0",
"node-sass": "4.14.1",
"prettier": "npm:wp-prettier@2.0.5",
"stylelint": "^13.8.0",
"stylelint-config-wordpress": "17.0.0",
"typescript": "3.9.7",
"webpack": "4.44.2",
"webpack-cli": "3.3.12",
"wp-textdomain": "1.0.1"
},
"engines": {
"node": "^12.20.1",
"npm": "^6.14.6"
},
"husky": {
"hooks": {
"post-merge": "./bin/post-merge.sh",
"pre-commit": "lint-staged",
"pre-push": "./bin/pre-push.sh"
}
},
"lint-staged": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.scss": [
"stylelint --syntax=scss --fix",
"git add"
],
"*.js": [
"eslint --fix",
"git add"
],
"*.ts": [
"eslint --fix",
"git add"
]
},
"browserslist": [
"> 0.1%",
"ie 8",
"ie 9"
],
"subsets": {
"no-e2e": {
"exclude": [
"@woocommerce/api",
"@woocommerce/api-core-tests",
"@woocommerce/e2e-core-tests",
"@woocommerce/e2e-environment",
"@woocommerce/e2e-utils",
"@wordpress/e2e-test-utils"
]
}
} }
} }

0
packages/js/.gitkeep Normal file
View File

0
packages/php/.gitkeep Normal file
View File

View File

@ -0,0 +1,21 @@
*.min.js
/assets/js/accounting/**
/assets/js/flexslider/**
/assets/js/jquery-blockui/**
/assets/js/jquery-cookie/**
/assets/js/jquery-flot/**
/assets/js/jquery-payment/**
/assets/js/jquery-qrcode/**
/assets/js/jquery-serializejson/**
/assets/js/jquery-tiptip/**
/assets/js/jquery-ui-touch-punch/**
/assets/js/js-cookie/**
/assets/js/photoswipe/**
/assets/js/prettyPhoto/**
/assets/js/round/**
/assets/js/select2/**
/assets/js/selectWoo/**
/assets/js/stupidtable/**
/assets/js/zeroclipboard/**
/assets/js/zoom/**

View File

@ -0,0 +1,31 @@
/** @format */
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true,
},
globals: {
wp: true,
wpApiSettings: true,
wcSettings: true,
es6: true,
},
rules: {
camelcase: 0,
indent: 0,
'max-len': [ 2, { code: 140 } ],
'no-console': 1,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
modules: true,
experimentalObjectRestSpread: true,
jsx: true,
},
},
};

84
plugins/woocommerce/.gitignore vendored Normal file
View File

@ -0,0 +1,84 @@
# Editors
project.xml
project.properties
/nbproject/private/
.buildpath
.project
.settings*
.idea
.vscode
.eslintcache
*.sublime-project
*.sublime-workspace
.sublimelinterrc
*.swp
# Grunt
node_modules/
none
# Sass
.sass-cache/
# Compiled CSS
/assets/css/*.css
/assets/css/photoswipe/**/*.min.css
# Minified JS
/assets/js/**/*.min.js
# OS X metadata
.DS_Store
# Windows junk
Thumbs.db
# Behat/CLI Tests
tests/cli/installer
tests/cli/composer.phar
tests/cli/composer.lock
tests/cli/composer.json
tests/cli/vendor
# Unit tests
/tmp
/tests/bin/tmp
/tests/e2e/config/local-*.json
/tests/e2e/config/local.json
/tests/e2e/config/default.json
/tests/e2e/env/config/default.json
/tests/e2e/docker
/tests/e2e/env/docker/wp-cli/initialize.sh
/tests/e2e/env/build/
/tests/e2e/env/build-module/
/tests/e2e/screenshots
/tests/e2e/plugins
/tests/e2e/utils/build/
/tests/e2e/utils/build-module/
# Logs
/logs
# Composer
/vendor/
/bin/composer/**/vendor/
/lib/vendor/
contributors.md
contributors.html
# Yarn
yarn.lock
# Packages
/packages/*
!/packages/README.md
# Screenshots for e2e tests failures
/screenshots/
# Language files
i18n/languages/woocommerce.pot
# Build
build/
woocommerce.zip

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

View File

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB

View File

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

View File

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 303 KiB

View File

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 279 KiB

View File

@ -194,14 +194,6 @@
} }
} }
h1.search-form-title {
clear: left;
font-size: 20px;
line-height: 1.2;
margin: 48px 0 16px;
padding: 0;
}
.update-plugins .update-count { .update-plugins .update-count {
background-color: #d54e21; background-color: #d54e21;
border-radius: 10px; border-radius: 10px;
@ -215,6 +207,26 @@
vertical-align: text-top; vertical-align: text-top;
} }
/**
* Marketplace related variables
*/
$font-sf-pro-text:
helveticaneue-light,
"Helvetica Neue Light",
"Helvetica Neue",
sans-serif;
$font-sf-pro-display: sans-serif;
h1.search-form-title {
clear: left;
font-size: 20px;
font-family: $font-sf-pro-display;
line-height: 1.2;
margin: 48px 0 16px;
padding: 0;
}
.addons-featured { .addons-featured {
margin: 0; margin: 0;
} }
@ -243,82 +255,15 @@
width: 124px; width: 124px;
} }
.addons-banner-block-item-icon,
.addons-column-block-item-icon {
align-items: center;
display: flex;
justify-content: center;
}
.addons-banner-block,
.addons-wcs-banner-block { .addons-wcs-banner-block {
align-items: center;
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
display: flex;
margin: 0 0 1em 0; margin: 0 0 1em 0;
padding: 2em 2em 1em; padding: 2em 2em 1em;
} }
.addons-banner-block img {
height: 62px;
}
.addons-banner-block p {
margin: 0 0 20px;
}
.addons-banner-block-items {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
margin: 0 -10px 0 -10px;
}
.addons-banner-block-item {
border: 1px solid #e6e6e6;
border-radius: 3px;
flex: 1;
margin: 1em;
min-width: 200px;
width: 30%;
}
.addons-banner-block-item-icon {
background: #f7f7f7;
height: 143px;
}
.addons-banner-block-item-content {
display: flex;
flex-direction: column;
height: 184px;
justify-content: space-between;
padding: 24px;
}
.addons-banner-block-item-content h3 {
margin-top: 0;
}
.addons-banner-block-item-content p {
margin: 0 0 auto;
}
.addons-wcs-banner-block {
display: flex;
align-items: center;
}
.addons-promotion-block {
display: flex;
padding: 20px;
.addons-img {
height: auto;
width: 200px;
}
}
.addons-wcs-banner-block-image { .addons-wcs-banner-block-image {
background: #f7f7f7; background: #f7f7f7;
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
@ -343,33 +288,6 @@
} }
} }
.addons-promotion-block-content {
display: flex;
flex-direction: column;
margin-left: 24px;
}
.addons-promotion-block-description {
margin-bottom: 20px;
}
.addons-promotion-block-title {
margin: 0 0 16px;
padding: 0;
}
.addons-promotion-block-buttons {
margin-top: auto;
.addons-button {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
}
.addons-shipping-methods .addons-wcs-banner-block { .addons-shipping-methods .addons-wcs-banner-block {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
@ -415,13 +333,6 @@
} }
} }
.addons-column-section {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
}
.addons-column { .addons-column {
flex: 1; flex: 1;
width: 50%; width: 50%;
@ -432,90 +343,6 @@
margin-right: 0; margin-right: 0;
} }
.addons-small-light-block,
.addons-small-dark-block,
.addons-column-block {
box-sizing: border-box;
border: 1px solid #ddd;
margin: 0 0 1em;
padding: 20px;
}
.addons-column-block img {
max-height: 50px;
max-width: 50px;
}
.addons-small-light-block,
.addons-column-block {
background: #fff;
}
.addons-column-block-left {
float: left;
}
.addons-column-block-right {
float: right;
}
.addons-column-block-item {
border-top: 2px solid #f9f9f9;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 -20px;
padding: 20px;
}
.addons-column-block-item-icon {
background: #f7f7f7;
border: 1px solid #e6e6e6;
height: 100px;
margin: 0 10px 10px 0;
width: 100px;
}
.addons-column-block-item-content {
display: flex;
flex: 1;
flex-wrap: wrap;
height: 20%;
justify-content: space-between;
min-width: 200px;
}
.addons-column-block-item-content h2 {
float: left;
margin-top: 8px;
}
.addons-column-block-item-content a {
float: right;
}
.addons-column-block-item-content p {
float: left;
}
.addons-banner-block-item,
.addons-column-block-item {
display: none;
}
.addons-banner-block-item:nth-child(-n + 3) {
display: block;
}
.addons-column-block-item:nth-of-type(-n + 3) {
display: flex;
}
.addons-small-dark-block {
background-color: #54687d;
text-align: center;
}
.addons-small-dark-items { .addons-small-dark-items {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -526,14 +353,6 @@
margin: 0 0 20px; margin: 0 0 20px;
} }
.addons-small-dark-block h1 {
color: #fff;
}
.addons-small-dark-block p {
color: #fafafa;
}
.addons-small-dark-item-icon img { .addons-small-dark-item-icon img {
height: 30px; height: 30px;
} }
@ -542,40 +361,6 @@
margin: 28px auto 0; margin: 28px auto 0;
} }
.addons-small-light-block {
display: flex;
flex-wrap: wrap;
}
.addons-small-light-block h1 {
margin-top: -12px;
}
.addons-small-light-block p {
margin-top: 0;
}
.addons-small-light-block img {
height: 225px;
margin: 0 0 0 -20px;
}
.addons-small-light-block-content {
display: flex;
flex: 1 1 100px;
flex-direction: column;
justify-content: space-around;
}
.addons-small-light-block-buttons {
display: flex;
justify-content: space-between;
}
.addons-small-light-block-content a {
width: 48%;
}
.addons-button-solid { .addons-button-solid {
background-color: #674399; background-color: #674399;
color: #fff; color: #fff;
@ -645,31 +430,64 @@
.addons-small-dark-item { .addons-small-dark-item {
width: 100%; width: 100%;
} }
.addons-column-block-item-icon {
background: none;
border: none;
height: 75px;
margin: 0 10px 10px 0;
width: 75px;
}
} }
.marketplace-content-wrapper { .marketplace-content-wrapper {
font-family: $font-sf-pro-text;
margin: 0 auto; margin: 0 auto;
max-width: 1032px; max-width: 1032px;
width: 100%; width: 100%;
} }
.addon-product-group-title {
font-family: $font-sf-pro-display;
letter-spacing: 0.38px;
}
.addon-product-group-description-container {
align-items: center;
display: flex;
flex-direction: row;
font-size: 14px;
justify-content: space-between;
line-height: 20px;
.addon-product-group-see-more,
.addon-product-group-see-more:visited {
color: #007cba; /* Primary / Blue */
display: block;
font-size: 13px;
text-decoration: none;
}
}
.products { .products {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
flex-wrap: wrap; flex-wrap: wrap;
font-weight: normal;
justify-content: space-between; justify-content: space-between;
margin: 0; margin: 0;
max-width: 1032px; max-width: 1032px;
overflow: hidden; overflow: hidden;
.product.addons-product-banner,
.product.addons-buttons-banner {
max-width: calc(100% - 2px);
}
@media screen and (min-width: 960px) {
// Adjust heading titles font for three-column product groups
&.addons-products-three-column li.product {
max-width: calc(33.33% - 12px);
h2,
h3 {
font-size: 16px;
}
}
}
li { li {
background: #fff; background: #fff;
border: 1px solid #dcdcde; border: 1px solid #dcdcde;
@ -697,11 +515,15 @@
.product-details { .product-details {
padding: 24px; padding: 24px;
position: relative;
/* Display an image (product's icon) top right */
.product-img-wrap { .product-img-wrap {
display: block; display: block;
float: right;
margin-left: 24px; margin-left: 24px;
position: absolute;
right: 24px;
top: 24px;
img { img {
border-radius: 3px; border-radius: 3px;
@ -712,29 +534,83 @@
} }
} }
/* Align aproduct-related banner image vertically centered */
&.addon-product-banner-details {
align-items: center;
display: flex;
flex-direction: row;
justify-content: space-between;
.product-img-wrap {
position: unset;
img {
max-width: 150px;
max-height: 150px;
}
}
}
h2, h2,
h3 { h3 {
color: #007cba; color: #007cba;
font-family:
HelveticaNeue-Light,
"Helvetica Neue Light",
"Helvetica Neue",
sans-serif;
font-size: 20px; font-size: 20px;
font-weight: 400; font-weight: 400;
letter-spacing: -0.32px;
line-height: 28px; line-height: 28px;
margin: 0 !important; margin: 0 !important;
// Don't cover a product icon
max-width: calc(100% - 48px);
}
.addons-buttons-banner-details h2 {
color: #1d2327; // Gray / Gray 90
} }
p { p {
color: #2c3338; color: #2c3338;
font-size: 14px;
line-height: 20px;
margin: 14px 64px 0 0; margin: 14px 64px 0 0;
max-width: 389px; width: 100%;
}
.addons-buttons-banner-details p {
font-size: 14px;
margin-bottom: 14px;
max-width: none;
}
.product-developed-by {
color: #50575e; /* Gray 60 */
font-size: 12px;
line-height: 20px;
margin-top: 4px;
.product-vendor-link {
color: #50575e; /* Gray 60 */
}
}
.product-developed-by {
color: #50575e; // Gray 60
font-size: 12px;
font-family: sans-serif;
line-height: 20px;
margin-top: 4px;
.product-vendor-link {
color: #50575e; // Gray 60
}
} }
} }
.product-footer { .product-footer {
align-items: center;
border-top: 1px solid #dcdcde; border-top: 1px solid #dcdcde;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 24px; padding: 24px;
.price { .price {
@ -742,32 +618,119 @@
color: #1d2327; color: #1d2327;
} }
.price-suffix {
color: #646970; // Gray 50
}
.product-reviews-block {
display: flex;
flex-direction: row;
margin-top: 4px;
.product-rating-star {
background-repeat: no-repeat;
background-size: contain;
height: 16px;
margin: 4px 4px 4px 0;
width: 17px;
&__fill {
background-image: url(../images/icons/star-golden.svg);
}
&__half-fill {
background-image: url(../images/icons/star-half-filled.svg);
}
&__no-fill {
background-image: url(../images/icons/star-gray.svg);
}
}
.product-reviews-count {
color: #646970; // Gray 50
font-size: 12px;
font-family: sans-serif;
line-height: 24px;
letter-spacing: -0.154px;
margin-left: 4px;
}
}
.button { .button {
background-color: #fff; background-color: #fff;
border-color: #007cba; border-color: #007cba;
color: #007cba; color: #007cba;
float: right; float: right;
font-size: 13px;
height: 36px;
line-height: 30px;
padding: 2px 14px;
}
}
}
.addons-buttons-banner {
display: flex;
flex-direction: row;
.addons-buttons-banner-image {
background-repeat: no-repeat;
background-size: cover;
height: 190px;
margin: 24px;
width: 200px;
}
.addons-buttons-banner-details-container {
padding-left: 0;
width: calc(100% - 198px - 24px - 24px);
}
.addons-buttons-banner-details-container {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.button.addons-buttons-banner-button,
.button.addons-buttons-banner-button:hover {
background: #fff;
border: 1.5px solid #624594;
color: #624594;
padding: 4px 12px;
margin-right: 16px;
&.addons-buttons-banner-button-primary {
background-color: #624594;
color: #fff;
} }
} }
} }
} }
.storefront { .storefront {
max-width: 990px;
background: url(../images/storefront-bg.jpg) bottom right #f6f6f6; background: url(../images/storefront-bg.jpg) bottom right #f6f6f6;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-top: 1em; margin: 1em auto;
padding: 20px; padding: 24px;
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
img { img {
width: 278px; display: block;
width: 100%;
max-width: 400px;
height: auto; height: auto;
float: left; margin: 0 auto 16px;
margin: 0 20px 0 0;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
} }
p:last-of-type {
margin-bottom: 0;
}
p { p {
max-width: 750px; max-width: 750px;
} }
@ -2954,30 +2917,6 @@ ul.wc_coupon_list_block {
float: right; float: right;
} }
} }
.wc-addons-wrap {
.addons-promotion-block {
flex-direction: column;
padding: 24px;
.addons-img {
height: auto;
width: 100%;
max-width: 240px;
margin: 0 auto 20px;
}
}
.addons-promotion-block-content {
display: block;
margin-left: 0;
}
.addons-promotion-block-title {
margin-top: 4px;
}
}
} }
.column-customer_message .note-on { .column-customer_message .note-on {
@ -7690,5 +7629,18 @@ table.bar_chart {
.marketplace-header { .marketplace-header {
padding-left: 84px; padding-left: 84px;
} }
.storefront {
h2 {
margin-top: 0;
}
img {
float: left;
margin: 0 16px 0 auto;
width: 278px;
}
}
} }
} }

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 866 B

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 929 B

View File

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 804 B

After

Width:  |  Height:  |  Size: 804 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

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