Commit Graph

230 Commits

Author SHA1 Message Date
Claudio Sanches fd3dfdbf3e
Merge pull request #31129 from woocommerce/distignore/project.json
Remove project.json from distribution
2021-11-11 18:34:22 -03:00
Claudio Sanches 7c145b9f69
Merge pull request #31148 from woocommerce/fix/repository-structure
Moved Test File
2021-11-11 18:33:45 -03:00
Christopher Allford f3bd2739b8 Moved Test File
It looks like a test file ended up at the top of the repository, this
moved it to the correct location.
2021-11-11 13:16:27 -08:00
roykho 8cc99368f2
Update unit tests readme 2021-11-11 11:35:01 -08:00
roykho 9267d70dc7
Update e2e testing steps to use Nx 2021-11-11 07:54:55 -08:00
Paul Sealock 15f26ee8f7 update to 3.0.2 of changelogger 2021-11-11 17:03:44 +13:00
Paul Sealock 5c68568bb7 Revert "add nx composer-install targets"
This reverts commit ffaef64343.
2021-11-11 16:47:50 +13:00
Paul Sealock ffaef64343 add nx composer-install targets 2021-11-11 16:43:27 +13:00
Paul Sealock 20fb81eb5a point to next changelog 2021-11-11 16:38:38 +13:00
Paul Sealock 40918d28f2 core changelog content 2021-11-11 16:30:22 +13:00
Paul Sealock a5abab9ab0 Add Jetpack Changelogger 2021-11-11 16:28:10 +13:00
roykho aa2dc625e2
Remove install-subset process 2021-11-10 13:35:16 -08:00
roykho f75523a2ca
Remove project.json from distribution 2021-11-10 12:02:13 -08:00
barryhughes 13f598a0b1
Whitespace. 2021-11-10 13:06:46 -05:00
barryhughes 55503c6bd6
Fix hook/callback name, add type hints. 2021-11-10 13:06:46 -05:00
Matt Harrison 594eedeca1
Add Product Reviews filter for `review` comment type.
Creates the filter option for the WordPress Comments page to filter to
product reviews.

Closes #29920
2021-11-10 13:06:20 -05:00
roykho 898ccb986f
Add some common composer executor commands for woocommerce so it can be used in Nx context 2021-11-10 06:34:54 -08:00
Roy Ho 9d08ac8ac3
Merge pull request #31095 from woocommerce/setup-nx
Setup nx
2021-11-09 20:26:37 -08:00
Brian 1bd2886b0f take over fix of barryhughes
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2021-11-09 15:31:58 -08:00
Brian 2d6451d6e2 revert changes 2021-11-09 15:31:57 -08:00
Brian c530dc60fd Update i18n/states.php
linting issue - done by barryhughes

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2021-11-09 15:29:44 -08:00
Brian c0e4852cda Update class-wc-countries.php
hide PLZ

..based on feedback at https://github.com/woocommerce/woocommerce/issues/30375#issuecomment-937858938
2021-11-09 15:29:44 -08:00
Brian 8abba36b89 Update states.php
fix codesniff
2021-11-09 15:29:43 -08:00
Brian 13be555407 update chile regions
based on https://en.wikipedia.org/wiki/ISO_3166-2:CL
2021-11-09 15:29:43 -08:00
Ron Rennick 9736b15eb6
Merge pull request #31102 from woocommerce/fix/30655
remove duplicate gitignore entries
2021-11-09 16:46:05 -04:00
roykho d839bdfc94
Implement executors for all script commands 2021-11-09 12:35:22 -08:00
Peter Fabian 619d7097f1
Merge pull request #31100 from woocommerce/brexit-tax-obw
Recommend automated taxes to  'GB'
2021-11-09 19:23:29 +01:00
Néstor Soriano d64c4492c1
Add promoted card to in-App marketplace page (#31090)
* Add promoted card to in-App marketplace page

* Change name of transient

Changed name of transient for v2.0 of in-app marketplace featured page
content, so sites upgrading to WooCommerce 5.9 will get the correct
data for the new version of the page.
2021-11-09 08:02:57 -07:00
Peter Fabian 80ba82a00e
Merge pull request #30970 from woocommerce/fix/20563
Clarify tooltip for on-hold email.
2021-11-09 14:57:42 +01:00
Ron Rennick 64b562e498
Merge pull request #31082 from woocommerce/add/wsl-instructions
Added WSL instructions
2021-11-08 13:34:27 -04:00
Tom Cafferkey c5e17812f0 Ensure we are loading product page gallery scripts in for FSE themes 2021-11-08 17:26:46 +00:00
Rodel 7c1888ddad Better phrasing in Running Tests opening statement 2021-11-09 00:45:34 +08:00
Barry Hughes 976f623792
Merge pull request #31091 from woocommerce/update/woocommerce-admin-2.8.0_Woo-6.0
Bump WooCommerce Admin version to 2.8.0
2021-11-08 08:10:58 -08:00
Vedanshu Jain ca2495fc96
Merge pull request #31092 from woocommerce/add/5.9-changelog-entries
Add changelog entries for 5.9
2021-11-08 20:55:03 +05:30
Ron Rennick a53e37f43b remove duplicate gitignore entries 2021-11-08 11:03:19 -04:00
David Stone 10b534ac82 Add 'GB' to list of countries that are supported by taxjar since it no longer is part of EU
Closes https://github.com/Automattic/woocommerce-shipping-issues/issues/20
2021-11-08 13:02:00 +02:00
Ron Rennick a6df312732
Merge pull request #31084 from woocommerce/fix/e2e-env-readme-links
Update links to moved e2e READMEs.
2021-11-05 15:54:30 -03:00
roykho 0ddad32294
Add docker up/down to executors 2021-11-05 10:10:13 -07:00
roykho 4501f13a87
Accommodate different directory names for woocommerce 2021-11-05 10:09:34 -07:00
Tom Cafferkey 5cdc6c86f6 Revert change for theme support on permalinks 2021-11-05 15:35:08 +00:00
Tom Cafferkey 2003a7813e Create conditional function wc_current_theme_supports_woocommerce_or_fse 2021-11-05 15:31:22 +00:00
roykho b86a66168e
Add Nx script executors to woocommerce plugin 2021-11-05 08:19:36 -07:00
Rodel f37bc08a44 Corrected reference to WSL instructions 2021-11-05 20:44:31 +08:00
Nestor Soriano b5c5a4da15
Improve handling of relative paths in downloadable files
to prevent access to files outside of WordPress uploads folder.
2021-11-05 13:43:22 +01:00
Rodel 8c8385fcce Remove earlier WSL section 2021-11-05 20:42:12 +08:00
Rodel 1b60740e57 Reference to WSL md at the beginning of Running tests section 2021-11-05 20:40:54 +08:00
Rodel df85aa293c Minor changes 2021-11-05 20:23:37 +08:00
Rodel 906afa8a67 Separate readme for WSL instructions 2021-11-05 20:10:03 +08:00
Nestor Soriano aaab2095fa
Change stable tag to 5.9 2021-11-05 12:57:59 +01:00
Nestor Soriano e1bdd037c1
Add missing changelog entries for 5.9 2021-11-05 12:56:59 +01:00
Nestor Soriano 63531b985b
Bump WooCommerce Admin version to 2.8.0 2021-11-05 12:11:11 +01:00
Nestor Soriano 2d71ec403c
Fix (and improve) failing unit test. 2021-11-05 11:59:33 +01:00
Nestor Soriano d98112e014
Use base taxes instead of current user taxes in wc_get_price_excluding_tax
Modify wc_get_price_excluding_tax so that when there's no user
available from a passed order and the
'woocommerce_adjust_non_base_location_prices' filter returns false,
the shop base location is used for the tax calculation instead of
the location of the currently logged in user.
2021-11-05 11:59:33 +01:00
Nestor Soriano 76c611b2d8
Fix: wc_get_price_excluding_tax when an order with no customer is passed
PR #30692 modified 'wc_get_price_excluding_tax' so that if an order
is passed its customer will be passed to WC_Tax::get_rates in order
to use the proper location for the taxes to be discounted. The problem
is that when the order has no customer (it's "Guest") an invalid
customer (id=0) is passed, which has no location, and thus no taxes
are deducted whatsoever.

The fix consists of checking if the customer id from the order is 0,
and in that case no customer is passed to WC_Tax::get_rates, thus
the shop location is used for the taxes.
2021-11-05 11:59:33 +01:00
roykho b64d0b3dfe
Add initial project.json config files to all packages and plugins 2021-11-04 14:51:04 -07:00
Lourens Schep 012359b499 Fix format of order_edit_recalc_totals props, so event does not get rejected 2021-11-04 12:26:41 -03:00
roykho acbd9883f1
Prevent from running npm 2021-11-04 07:36:58 -07:00
roykho 7db8509af1
Extend the base TS configuration and update package path 2021-11-04 07:32:47 -07:00
Tomek Wytrębowicz e73329fdf3 Update links to moved e2e READMEs. 2021-11-04 12:58:11 +01:00
Rodel 73c3563290 Added WSL instructions 2021-11-04 02:48:30 +08:00
Michael Silber 4cba4bc1be Add woocommerce_after_variations_table action hook after variations table 2021-11-03 05:51:55 -07:00
Manos Psychogyiopoulos fb1cc38375 Delay handling of requests to hide admin notices and limit to admin area
Moving this to `admin_init` also ensures that WC_Notes_Run_Db_Update has been instantiated before it can hook into the `woocommerce_hide_update_notice` action. See:

- WC_Install:init()
- WC_Notes_Run_Db_Update::construct()

closes #30781
2021-11-03 10:28:30 +02:00
Peter Fabian 3398cf88cb Clarify tooltip for on-hold email. 2021-11-03 13:35:58 +05:30
barryhughes 91435c89c5 Correct IQD currency symbol. 2021-11-02 10:32:37 -07:00
Peter Fabian f7eeeacb10 Fixed typo in readme. 2021-11-01 11:43:26 +01:00
Barry Hughes ec5ab7cdb5
Merge pull request #30997 from woocommerce/update/has-block-template-filter
Update has_block_template function to use apply_filters
2021-10-29 08:47:04 -07:00
Tom Cafferkey f8eebbecbd
Update plugins/woocommerce/includes/class-wc-template-loader.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2021-10-29 16:16:10 +01:00
Tom Cafferkey 3047603e2b Updated has_block_template to have type casting, added a block comment to the filter and updated filter prefix to use woocommerce_ 2021-10-29 13:02:23 +01:00
Paul Sealock 789d942f89
Update e2e package locations and add PNPM (#30977) 2021-10-29 08:32:31 +13:00
Peter Fabian bc25115549
Merge pull request #31034 from woocommerce/tweak/readme-verbiage
Spotfix a few typos
2021-10-28 14:38:37 +02:00
Néstor Soriano 2d405cc8c1
Merge pull request #30901 from woocommerce/fix/30594-api-key-description-length
Fix Description Length Preventing REST API Key Creation
2021-10-27 11:10:24 +02:00
Néstor Soriano 59ab939282
Merge pull request #30935 from EvanHerman/trunk
Update locale-info.php
2021-10-27 09:57:44 +02:00
Néstor Soriano 33715a6d96
Merge pull request #30950 from woocommerce/add/enhance-unit-test-documentation
Add troubleshooting section to running unit test section
2021-10-27 09:22:58 +02:00
Nestor Soriano 14ebad52a6
Add "Troubleshooting" to the ToC in the unit tests README. 2021-10-27 09:20:33 +02:00
Barry Hughes 03903d36a6
Spotfix a few typos 2021-10-26 13:04:44 -07:00
Rodel ec6f839ee2 Added tests for batch update products 2021-10-26 18:14:57 +08:00
Rodel 817db0aa14 Minor doc update 2021-10-26 18:14:36 +08:00
Rodel 751dc5da1f Data file for products CRUD tests 2021-10-26 16:27:20 +08:00
Rodel 054183cb5a Renamed data file for product-list tests 2021-10-26 15:40:00 +08:00
Rodel 04d6e7acdb Minor test suite name change 2021-10-25 20:03:46 +08:00
Rodel 9104089b01 Split products tests 2021-10-25 20:02:17 +08:00
And Finally 717317142a Restored support for price suffix in in-app marketplace product card, allowing prices per month. This was added in https://github.com/woocommerce/woocommerce/pull/30840, but was accidentally omitted when we fixed conflicts. 2021-10-25 12:55:05 +01:00
Rodel f44f62c385 Merge branch 'trunk' into add/api-test-crud-products 2021-10-25 18:02:46 +08:00
Greg 7f904a7d91
Merge pull request #30982 from woocommerce/add/api-test-refunds
Add Core API tests for Refunds API
2021-10-21 11:29:44 -06:00
Evan Herman 4353eaa73e Update locale-info.php
Revert changes in 9d06c74339?branch=9d06c74339c2ae190b40acc7f0aef38a53140e94&diff=unified#diff-122b62121f7a3deb664f05d12fb2af1c40cf819712b5f2db935017ce4a4c45cbR11
2021-10-21 10:52:01 -04:00
Rodel ea69de368c Added changelog entry 2021-10-21 16:59:43 +08:00
Rodel e6a009e598 Corrected changelog format 2021-10-21 16:58:58 +08:00
Rodel c08358ff48 Corrected Changelog entry 2021-10-21 16:58:48 +08:00
Rodel f5cec2b920 Added changelog entry 2021-10-21 16:58:29 +08:00
Rodel a309b4af2c Added test for variable product 2021-10-21 16:33:09 +08:00
Rodel 8c6252996d Added test for virtual product 2021-10-21 15:00:58 +08:00
Rodel cdebd25895 Corrected changelog format 2021-10-21 14:21:47 +08:00
Rodel 91e570b89b Corrected Changelog entry 2021-10-21 14:09:27 +08:00
Rodel 919f41fed3 Remove unneccessary import 2021-10-21 14:08:47 +08:00
James eb579c814c Fixes #30400 by multiplying refund values by -1 2021-10-20 18:13:06 +02:00
Tom Cafferkey b4526429cb Update has_block_template function to use a filter 2021-10-20 15:44:16 +01:00
Barry Hughes fa0464930c
Merge pull request #30960 from woocommerce/fix/27103-rate-limiter
Store WC_Rate_Limit Entries in a Custom Table
2021-10-20 07:10:20 -07:00
Peter Fabian 75dbec00fd
Merge pull request #30987 from woocommerce/fix/27793
add phpdoc block with gist reference to woocommerce_package_rates filter
2021-10-20 15:43:18 +02:00
Jeff Stieler 5aee007892 Clear rate limit cleanup job on uninstall. 2021-10-20 08:27:00 -04:00
Jeff Stieler 5d182ee71a Put cleanup hook attachment in an init method. 2021-10-20 08:26:59 -04:00
Jeff Stieler befa2b0a95 Add test case for options migration. 2021-10-20 08:26:58 -04:00
Jeff Stieler a255f4b18e Use substr instead of str_replace. 2021-10-20 08:26:56 -04:00
Jeff Stieler 6715fb5a9b Save 2 seconds on test execution by reducing sleep() time. 2021-10-20 08:26:55 -04:00
Jeff Stieler 20614cfdcb Add rate limiter test case for cache misses. 2021-10-20 08:26:52 -04:00
Jeff Stieler f218571fec Add daily cleanup of expired rate limits. 2021-10-20 08:26:51 -04:00
Jeff Stieler a8b4f83c9c Cache rate limit values. 2021-10-20 08:26:49 -04:00
Jeff Stieler 070dc4fcd1 Migrate rate limit options on DB update. 2021-10-20 08:26:47 -04:00
Jeff Stieler 39d3de1d41 Use a new table for storing rate limits. 2021-10-20 08:26:45 -04:00
Niels Lange ebd37e462f Move additional information out of the source code block 2021-10-20 18:24:23 +07:00
Jeff Stieler 43b770ce1f Fix orderby slug and include parameters. 2021-10-20 16:28:55 +05:30
Rodel 34eb9549dc Added tests for simple product 2021-10-20 17:50:08 +08:00
Rodel b415f103fb Merge branch 'trunk' into add/api-test-refunds 2021-10-20 13:39:30 +08:00
Greg c99af9f33e
Merge pull request #30979 from woocommerce/add/api-test-coupons-2
Added tests for coupons api
2021-10-19 15:51:07 -06:00
Ron Rennick 37c7de4422 add phpdoc block with gist reference to woocommerce_package_rates filter 2021-10-19 13:15:43 -03:00
Rodel caf0a818df Added changelog entry 2021-10-19 20:35:18 +08:00
Rodel 515b073834 Added tests for Refunds API 2021-10-19 20:34:43 +08:00
Niels Lange 7b88cb09a1 Add troubleshooting section to running unit test section 2021-10-19 17:45:14 +07:00
Jeff Stieler 3e5e9e8eda
Add test case for API key admin ajax error visibility. 2021-10-19 12:33:20 +02:00
Jeff Stieler 4975a5ea21
Avoid reporting success when API key insertion fails. 2021-10-19 12:33:20 +02:00
Jeff Stieler 68f1b12797
Limit API key description field to 200 characters. 2021-10-19 12:33:20 +02:00
Jeff Stieler 7a68bc5ff7
Ensure that API key descriptions are truncated over the REST API. 2021-10-19 12:33:19 +02:00
Peter Fabian 7a6c320fcc
Make the message more clear. 2021-10-19 11:45:42 +02:00
Peter Fabian 4ea28030f2
Warn users of shipping rates to test for existence of meta_data correctly.
As per the info in the issue itself, using `isset()` gives incorrect result all the time, so warn developers about the problem.
2021-10-19 11:45:42 +02:00
Rodel b3410791e5 Added changelog entry 2021-10-19 15:20:39 +08:00
Rodel ce3bb3dc4c Added tests for coupons api 2021-10-19 15:09:48 +08:00
Paul Sealock ffa595ac40 add working directory path to build workflow 2021-10-19 10:46:11 +13:00
roykho 0b3a8a0557 Move phpunit.xml into plugins/woocommerce structure 2021-10-19 10:35:46 +13:00
Paul Sealock 926685448e JS formatting files 2021-10-19 10:35:46 +13:00
Paul Sealock a837deea64 Add wp-env 2021-10-19 10:35:46 +13:00
Paul Sealock ef015f740f git mv a few folders 2021-10-19 10:35:45 +13:00