Gerhard Potgieter
b7facc0674
Merge pull request #23663 from danielbitzer/add_get_coupons_method
...
Add WC_Abstract_Order::get_coupons()
2019-05-14 11:35:21 +02:00
Gerhard
486321161c
Update usage of get_used_coupon_codes to get_coupon_codes
2019-05-14 11:21:27 +02:00
Daniel Bitzer
3024043bb4
Add unit test for WC_Abstract_Order::get_coupons()
2019-05-14 15:46:49 +09:30
Gerhard
31acfbcb4a
Deprecate WC_Abstract_Order::get_used_coupons in favor of WC_Abstract_Order::get_used_coupon_codes, this reflects the actual data being returned better.
2019-05-13 14:40:54 +02:00
Gerhard Potgieter
d2c7d8c86e
Merge pull request #23535 from woocommerce/fix/23518
...
Fix: parameter values should be converted back as well when building form fields
2019-05-10 10:43:28 +02:00
Claudio Sanches
4c028c13ba
Updated unit tests
2019-05-09 17:28:32 -03:00
Rodrigo Primo
18ee70918b
Fix PHPCS violations in tests/ using PHPCBF
...
This commit fixes all 1533 PHPCS errors that PHPCBF can fix automatically in the tests/ directory. Before this change there was a total of 3106 PHPCS errors in the WooCommerce repository and now there is 1573 errors.
2019-05-01 19:05:00 -03:00
Rodrigo Primo
45c2c78ea2
Fix: parameter values should be converted back as well when building form fields
...
PR #23196 added a workaround to `parse_str()` limitation when dealing with full-stops, pluses, and spaces in the parameter key. This workaround involved temporarily replacing those three characters with placeholders before calling `parse_str()` and then replacing back to the original form. This commit fixes a bug in this logic that was replacing back only parameters keys and not parameters values.
For example, if the query string is `?query.parameter=foo.bar`, the resulting <input> field contained `foo{dot}bar`, instead of the expected `foo.bar`.
2019-04-26 13:58:27 -03:00
Rodrigo Primo
e21430703c
Remove redundant calls to var_export() in test_wc_query_string_form_fields()
...
It is not necessary to use the $message parameter of assertEquals() to output the value of $actual_html, as PHPUnit already output this variable value in case of error.
2019-04-26 11:49:30 -03:00
Mike Jolley
9bf2081869
Merge pull request #23477 from woocommerce/fix/23466
...
Default category sorting order should be overwritten if defined by get_terms
2019-04-24 16:00:33 +01:00
Mike Jolley
8ffc4fca71
menu_order test
2019-04-24 10:45:33 +01:00
Mike Jolley
8fe68400be
name_num tests
2019-04-24 10:44:22 +01:00
Mike Jolley
3945aae94e
Test cases for sorting
2019-04-24 10:38:38 +01:00
Mike Jolley
a4ba20681e
added failing test
2019-04-23 11:48:24 +01:00
Mike Jolley
f306d3fc11
Merge pull request #23266 from woocommerce/fix/23234
...
Switch to subquery for sale product query
2019-04-18 12:36:22 +01:00
Mike Jolley
cafd81e6e5
Merge pull request #23329 from woocommerce/fix/23327
...
Non int value handling in wc_let_to_num
2019-04-18 11:30:57 +01:00
Mike Jolley
ceefe98bd0
Merge pull request #23297 from dkjensen/master
...
Remove tags from product titles when building PayPal request URL
2019-04-18 11:23:55 +01:00
Mike Jolley
b686150655
Merge pull request #23196 from woocommerce/fix/23195
...
Replace full stops before running through `parse_str`
2019-04-18 11:01:59 +01:00
Mike Jolley
630cae2483
phpcs for discounts class
2019-04-17 16:53:02 +01:00
Mike Jolley
29c3f63628
Failing test case for 23340
2019-04-17 16:41:04 +01:00
Gerhard
8ca0bd7b4d
Add logic to wc_let_to_num to handle non int values, added unit tests to cover these scenarios
2019-04-17 10:30:49 +02:00
Timmy Crawford
e12e4aaa25
Merge pull request #23304 from woocommerce/fix/link-all-variations
...
[3.6] Fix logic in link all variations
2019-04-15 11:16:22 -07:00
Timmy Crawford
438d22762e
Merge pull request #23246 from franticpsyx/issue-23245
...
Introduce IN and NOT IN clauses in `WC_Product_Data_Store_CPT::search_products
2019-04-15 11:08:32 -07:00
Rodrigo Primo
60a006d96a
Add unit test to cover WC_Tests_Product_CSV_Importer::import() when updating products
2019-04-15 12:00:49 -03:00
Rodrigo Primo
93f2050a2c
phpcs fixes
2019-04-15 11:59:55 -03:00
Mike Jolley
6c6785c844
Merge pull request #23269 from marcochiesi/patch-1
...
Added validation for Italian postcodes
2019-04-15 14:10:01 +01:00
Mike Jolley
1504f8af3e
Merge pull request #23011 from Tofandel/patch-2
...
Improve the speed of the admin dashboard by only updating transients once per class
2019-04-15 14:03:31 +01:00
Mike Jolley
d0c6c54989
Moved link/create code to data store with new unit test
...
This code was not testable within ajax code, so moved to the data stores.
2019-04-15 11:59:57 +01:00
David Jensen
23bda4503e
Add comment
2019-04-12 14:49:17 -07:00
David Jensen
ac6da3cb55
Unit test strip HTML from product title when building PayPal request URL
2019-04-12 14:44:38 -07:00
Marco Chiesi
92c356021c
Added missing parameter comments
2019-04-11 01:12:27 +02:00
Marco Chiesi
2a784a3003
Added missing doc comments (coding standards)
2019-04-11 01:03:48 +02:00
Marco Chiesi
cba442283c
Fixed wrong tests for Italian postcodes
2019-04-11 00:33:30 +02:00
Mike Jolley
d3e2d725e7
prevent test showing content
2019-04-10 13:50:42 +01:00
Manos Psychogyiopoulos
2fbb7bda5c
Check coding stds
2019-04-10 13:02:52 +03:00
Manos Psychogyiopoulos
c1b7c55768
Add exclude param tests
2019-04-10 12:47:31 +03:00
Manos Psychogyiopoulos
a9f86ef202
Add include param tests
2019-04-10 12:47:19 +03:00
Manos Psychogyiopoulos
e6f25b04d8
Add limit param tests
2019-04-10 12:47:06 +03:00
Timmy Crawford
ef4f0f0c0f
Merge pull request #23197 from woocommerce/fix/23182
...
[3.6] Fix backwards compatibility issues for wc_get_template function w/ tests
2019-04-08 10:19:16 -07:00
Mike Jolley
1cd2959087
unset rather than prevent the template being included.
2019-04-03 16:08:12 +01:00
Mike Jolley
7feae340f2
Add tests
2019-04-03 11:58:15 +01:00
Mike Jolley
2e9ce0a061
unit tests
2019-04-02 15:18:06 +01:00
Mike Jolley
c5b31cee3d
Unit test for counts
2019-04-02 11:45:58 +01:00
Mike Jolley
ad49085571
Append random number to reduce recusion
2019-03-27 12:22:15 +00:00
Mike Jolley
94466460ad
Tests
2019-03-26 11:09:30 +00:00
Claudio Sanches
a425e92672
Removed legacy "Orders index" tool
2019-03-15 11:34:32 +00:00
Adrien Foulon
8bae56d51a
Remove '_' prefix from function
2019-03-13 18:01:53 +01:00
Mike Jolley
e2e124f365
Merge pull request #22083 from woocommerce/feature/variation-search
...
Added storing attribute values as post_excerpt for variations.
2019-03-13 15:09:19 +00:00
Adrien Foulon
7099aa5d1a
Change function call to static
2019-03-13 13:48:39 +01:00
Peter Fabian
2b8d2cf3dd
PHPCS on test file.
2019-03-13 13:30:59 +01:00
Peter Fabian
0aa9a09d18
Enforced attribute order to make result unambiguous.
2019-03-13 12:36:46 +01:00
Adrien Foulon
a316101358
Fix tests
2019-03-13 11:58:59 +01:00
Peter Fabian
918ea3c5aa
Added test for attribute_summary.
2019-03-12 18:40:04 +01:00
Mike Jolley
c39f447ff4
Merge branch 'fix/22937'
2019-03-12 13:27:13 +00:00
Mike Jolley
0877e7d8f7
Merge pull request #22954 from woocommerce/add/blocks-rest-api
...
Merge blocks branch: add 8 product blocks and related API endpoints
2019-03-11 15:18:20 +00:00
Mike Jolley
fbda3a91d8
Merge feature/add-tracks into master
2019-03-11 15:15:50 +00:00
Mike Jolley
e55bb84e8b
Merge pull request #22718 from woocommerce/experiment/product-sorting-index
...
Performance: product sorting lookup table
2019-03-11 13:27:10 +00:00
Kelly Dwan
845300c975
Update test names and comments to reflect correct user role
2019-03-08 15:16:59 -05:00
Mike Jolley
15ca2144d3
Merge pull request #22773 from woocommerce/performance/delete-empty-meta
...
Performance: delete empty meta
2019-03-08 10:22:31 +00:00
Mike Jolley
e7c8db0796
Merge pull request #22887 from woocommerce/update/22882-additional-system-status-values
...
Additional System Status Options
2019-03-08 10:15:45 +00:00
Mike Jolley
a3c2dcd8f2
Update from master
2019-03-08 09:50:56 +00:00
Kelly Dwan
39a8bbf54c
Fix space/tab issue for phpcs
2019-03-07 12:32:55 -05:00
Claudio Sanches
14b96f0026
Fixed a typo
2019-03-07 14:23:17 -03:00
Claudio Sanches
7938e352e3
Fixed coding standards
2019-03-07 14:16:07 -03:00
Claudio Sanches
ef50a1d5a4
Introduced unit tests for wc_sanitize_phone_number
2019-03-07 14:14:39 -03:00
Mike Jolley
598ac86e95
Tests
2019-03-07 11:08:29 +00:00
Timmy Crawford
85713c4c1a
Updates per feedback.
2019-03-06 17:26:18 -05:00
Timmy Crawford
2b59c5db64
REST API: Add Blocks Products Controller
2019-03-06 17:26:17 -05:00
Timmy Crawford
e17d835e66
REST API: Add wc-blocks/v1/products/categories
2019-03-06 17:26:16 -05:00
Timmy Crawford
afdde006f1
Remove some copied 'terms' in the test file.
2019-03-06 17:26:16 -05:00
Timmy Crawford
f4e17ddcee
REST API: Add wc-blocks/v1/products/attributes controller.
2019-03-06 17:26:15 -05:00
Timmy Crawford
f2fa01d585
PHPCS fixes.
2019-03-06 17:26:15 -05:00
Timmy Crawford
c1313d433c
Updates per feedback.
2019-03-06 17:26:14 -05:00
Timmy Crawford
4311670956
REST API: wc-blocks/v1/products/attributes/%d/terms
2019-03-06 17:26:13 -05:00
Mike Jolley
edb378fcea
Tweak test (test_wc_format_coupon_code) now the format function matches titles
2019-03-06 11:53:20 +00:00
Mike Jolley
16a0a3e27e
Update from master
2019-03-05 19:03:01 +00:00
Gerhard
5ce0ea762a
Missed PHPCS fix
2019-03-05 14:33:10 +02:00
Paul Sealock
d968b95b53
Add opt in/out to settings page
2019-03-05 11:06:45 +13:00
Mike Jolley
5af9d968e5
Update from master
2019-03-01 10:29:17 +00:00
Rodrigo Primo
25f0023d38
Fix PHPCS violations automatically using phpcbf
2019-02-27 18:09:11 -03:00
Mike Jolley
cc8e516f7a
Merge pull request #22786 from woocommerce/improve/user-registration
...
Improve user's display_name generation during checkout
2019-02-27 12:55:56 +00:00
nishitlangaliya
ee621eec8a
fix: filter prefix changed and unit test added for fn:wc_get_product_stock_status_options
2019-02-25 19:03:57 +05:30
Claudio Sanches
79847ccb93
Fixed coding standards
2019-02-20 16:30:46 -03:00
Claudio Sanches
3ac5f32a8b
Updated tests for wc_create_new_customer
2019-02-20 16:29:10 -03:00
Mike Jolley
7def966e4f
Impoved JSON handling
2019-02-20 12:00:47 +00:00
Mike Jolley
d45734b6f3
Tweak indexes tests to test shipping indexes correctly
2019-02-19 15:35:28 +00:00
Mike Jolley
07eadfeb72
Merge pull request #22760 from woocommerce/performance/webhook-loading
...
Performance: webhook loading
2019-02-19 09:58:06 +00:00
Mike Jolley
2529cd60cd
Merge pull request #22731 from woocommerce/update/21952
...
Prevent webhooks for drafts and correct create vs updated for manual orders
2019-02-19 09:50:51 +00:00
Claudio Sanches
c01e334500
Fixed coding standards
2019-02-18 17:59:34 -03:00
Mike Jolley
4fd2a9f77e
Update from master
2019-02-18 15:04:58 +00:00
Mike Jolley
519b29d734
Tests
2019-02-15 12:25:04 +00:00
Mike Jolley
08e8c76eab
Update tests
2019-02-15 12:16:59 +00:00
Mike Jolley
84299ff5ed
Update the tests
2019-02-13 17:56:41 +00:00
Mike Jolley
0e21b3f4ce
Tests
2019-02-07 20:35:45 +00:00
Mike Jolley
b2c33b8e34
Merge branch 'master' into performance/slow-term-queries
2019-02-07 13:49:48 +00:00
Mike Jolley
889cf64ac4
Merge branch 'performance/wc-get-product-class'
2019-02-07 13:34:18 +00:00
Mike Jolley
4b485eba13
Fixed unit tests
2019-02-06 21:00:07 +00:00
Mike Jolley
72314f9dbc
Contains was backwards
2019-02-05 14:21:06 +00:00
Mike Jolley
cafe8b6b57
Tests check the image URL is contained rather than exact string
2019-02-05 14:11:07 +00:00
Mike Jolley
de8ff9b719
phpcs
2019-02-01 14:38:47 +00:00
Mike Jolley
3697f5104a
fix uncat display
2019-02-01 13:08:04 +00:00
Mike Jolley
1e3e5a4528
Merge pull request #22580 from woocommerce/fix/22515
...
recalculate coupons after adding coupon to order
2019-01-31 14:38:59 +00:00
Mike Jolley
133d108bd8
Merge pull request #22269 from Prospress/fix/22247
...
convert user creation GMT datestamp to local datetime in API
2019-01-31 12:56:40 +00:00
Toby Robles
59d4a81f1a
Peruvian currency updated
2019-01-30 10:43:52 -05:00
Ron Rennick
28710a522e
phpcs sniff fixes for orders.php
2019-01-27 20:57:58 -04:00
Ron Rennick
d888f456f8
remove line item subtotal adjustment from api coupon unit test
2019-01-27 20:49:02 -04:00
Mike Jolley
20330b01bd
Merge pull request #22531 from rellect/fix_ssl_check
...
Fix ssl check in case shop page no longer exists
2019-01-23 20:18:43 +00:00
Refael Iliaguyev
398bbe3754
sniff fixes
2019-01-23 17:26:17 +02:00
Refael Iliaguyev
8f0f22c11b
Fix ssl check in case shop page does not exists.
2019-01-23 16:08:13 +02:00
Luigi
548b00c660
Improve the way we do queries ( #22043 )
...
* Improve the way we do queries
* PHP legacy compatible
* Update aproach to filter queries with empty values
* Fixing Unit Tests
* Moving Unit Test to its the correct test function
* Filter missing the new param, allow_empty, also simplifiying unit test.
* Helper function to create counpon does not support empty coupon codes
* Helper function does not need to allot empty search
* Wrong code standard
* Fixing Code Standard Unit Test
2019-01-23 13:46:32 +00:00
Mike Jolley
99f663ad5c
Merge pull request #22131 from willgorham/improve-shipping-zone-continents
...
Improve shipping zone continents [Fixes #22130 ]
2019-01-23 13:27:16 +00:00
Ron Rennick
89ab2748da
update unit test to work when timezone_string is not set, add timezone assertions
2019-01-22 16:58:05 -04:00
Mike Jolley
380201be33
Merge pull request #22417 from woocommerce/fix/21175
...
Sort countries using new ascii comparison function
2019-01-22 14:47:41 +00:00
Mike Jolley
7ac26ce893
Merge pull request #22518 from Prospress/fix/21779_redux
...
Fix/21779 redux
2019-01-22 13:29:40 +00:00
claudiulodro
cdfe34f79a
skip couple tests on old versions
2019-01-21 10:02:55 -08:00
Mike Jolley
6367d19615
phpcs
2019-01-21 08:11:40 -08:00
Ron Rennick
ab6012fa3f
move test parameters with calculations to separate lines
2019-01-18 23:32:47 -04:00
Ron Rennick
6daf89ad6e
add descriptions to report sale by date tests
2019-01-18 23:27:11 -04:00
Ron Rennick
2bb2475e92
phpcs sniff fixes for class-wc-tests-report-sales-by-date.php
2019-01-18 23:26:45 -04:00
Brent Shepherd
739af008c6
Fix test_wc_load_webhooks_status_and_limit()
...
As the status is being explicitly passed to wc_load_webhooks(), it
will load webhooks with that status, not just active.
2019-01-18 14:30:35 +10:00
Brent Shepherd
ed55a3976a
Test against $wp_filter instead of has_filter()
...
Because we don't have the same WC_Webhook instance as used in
wc_load_webhooks(), so it's impossible to check if the same
object's process() method is attached as a callback.
2019-01-18 14:30:35 +10:00
Brent Shepherd
9fdbb124ae
Add $limit param to wc_load_webhooks()
...
And the corresponding data stores. Defaults to null, meaning do not
limit, for backward compatibility.
2019-01-18 14:30:35 +10:00
Brent Shepherd
67bf101aaf
Add $status param to wc_load_webhooks()
...
And the corresponding data stores. Defaults to '', meaning do not
load only webhooks with a specific status. This maintains backward
compatibility. However, the call to wc_load_webhooks() within
WooCommerce::load_webhooks() can now only load active webhooks, as
they are the only ones that should be enqueued.
2019-01-18 14:29:34 +10:00
Brent Shepherd
8ee3e8a6e9
Add WC_Tests_Webhook_Functions::create_webhook()
...
To make it reusable.
2019-01-17 15:12:29 +10:00
Claudiu Lodromanean
989865469e
Merge pull request #22416 from woocommerce/fix/21871
...
Incorrect rounding of multiple tax rates per location
2019-01-16 09:32:51 -08:00
unknown
883ecc3ca4
removed variable that was not being used
2019-01-11 19:19:15 -05:00
Gerhard
c24faa8ab4
Use array_values when checking assertSame for sort comparison of arrays.
2019-01-11 14:02:54 +02:00
Gerhard
0c3f5261c7
Add unit tests for wc_ascii_uasort_comparison
2019-01-11 13:48:37 +02:00
Mike Jolley
a4a421a86b
Failing test case for the issue
2019-01-11 11:34:47 +00:00
Mike Jolley
1815928208
Merge branch 'master' into pr/21217
2019-01-10 13:10:11 +00:00
Rodrigo Primo
519886838c
Merge pull request #21969 from woocommerce/add/21964
...
Add woocommerce_valid_location_types filter
2019-01-09 17:02:20 -02:00
Rodrigo Primo
8b129a89bf
phpcs fixes
2019-01-09 16:33:38 -02:00
Will Gorham
ec9d1d9402
Tests phpcs
2019-01-09 13:31:51 -05:00
Will Gorham
56fa520b8e
Tests for get_shipping_continents()
2019-01-09 13:31:30 -05:00
Mike Jolley
ade1021eff
Merge pull request #22205 from woocommerce/fix/22200
...
Introduce wc_is_webhook_valid_status
2019-01-08 15:32:57 +00:00
Mike Jolley
9a37852bee
Merge pull request #21438 from woocommerce/fix/20997
...
Unit tests for testing inclusive calculations
2019-01-08 15:31:35 +00:00
Mike Jolley
9644241cef
update from master
2019-01-08 14:51:05 +00:00
Mike Jolley
6dba8f3b05
Merge pull request #21498 from liquidweb/feature/sanitize-order-id-tests
...
Add tests for wc_sanitize_order_id()
2019-01-07 12:46:11 +00:00
JeroenSormani
f4775ccd90
Use shipping method instead of property through magic + doc return statements
2019-01-04 12:41:38 +00:00
Claudiu Lodromanean
2f82039869
Merge pull request #21938 from Prospress/fix/21935
...
Unescape imported escaped CSV formulas in product attributes
2019-01-02 11:59:39 -08:00
Ron Rennick
5dac4075b2
phpcs sniff fixes for customers.php
2018-12-27 11:18:22 -04:00
Ron Rennick
bd65e65285
update customer unit test
2018-12-27 11:02:28 -04:00
Ron Rennick
a924c15dee
unpdate unit tests for product export
2018-12-13 13:54:51 -04:00
Gerhard
4852db1e45
PHPCS fixes
2018-12-12 10:38:43 +02:00
Gerhard
189f346c2e
Add unit tests for wc_is_webhook_valid_status
2018-12-12 10:33:52 +02:00
Rodrigo Primo
f7bc3fb851
Merge pull request #21366 from birgire/unit-tests-count-asserting-21365
...
Use assertCount instead of assertEquals
2018-12-05 11:15:52 -02:00
claudiulodro
d1533261f5
Extra sanitizing around payment_method_title
2018-11-30 08:49:43 -08:00
Gerhard
e4ba5c7f3f
Add unit tests for new woocommerce_valid_location_types filter.
2018-11-19 13:21:02 +02:00
Claudiu Lodromanean
900d3bad93
Merge pull request #21778 from woocommerce/fix/21426
...
Make get_on_sale_products not include non published parent results
2018-11-06 15:50:31 -05:00
claudiulodro
0fa1448cfe
Topic blacklist
2018-11-02 10:21:30 -07:00