claudiulodro
694f7fdfd8
Order Item Fee tests
2017-09-28 13:37:01 -07:00
claudiulodro
f9a92fdc71
Order_Item_Meta tests
2017-09-28 11:40:33 -07:00
adnanmultidots
c72413d925
Removed unused variable
2017-09-22 15:27:21 +05:30
Mike Jolley
5151415eec
Merge branch 'discounts-class-fixes-and-tests'
2017-09-20 18:44:18 +01:00
Mike Jolley
21dfde842a
Revised coupon sort order to not rely on IDs which can differ between cart and tests
...
Also edited test to match
2017-09-20 18:41:48 +01:00
Mike Jolley
29107d24a9
Remove filters from tests and correct sums
2017-09-20 18:37:26 +01:00
claudiulodro
9d8e308a78
Make importer columns case-insensitive
2017-09-17 10:18:03 -07:00
Claudiu Lodromanean
f9120672bd
Merge pull request #16767 from hjoelr/bugfix-coupon-cache
...
Bugfix: coupon object cache not being cleared upon deletion
2017-09-17 09:45:45 -07:00
Joel Rowley
b24eb0b46a
Added more tests
2017-09-15 21:04:21 -04:00
Joel Rowley
b8b67cf471
Made state cleanup more explicit in case there were filters that need run on cleanup.
2017-09-15 21:00:56 -04:00
Joel Rowley
f2a06c1ef0
Made discount unit tests more robust using PHPunit's Data Provider and tearDown()
2017-09-15 21:00:56 -04:00
Mike Jolley
f9719c79eb
Merge pull request #16795 from hjoelr/bugfix/freeshipping-coupon
...
Bugfix: Resolve 'non-numeric value encountered' error in PHP 7.1 when freeshipping coupon used
2017-09-14 11:31:17 -07:00
Joel Rowley
458a6c87c7
Resolve 'non-numeric value encountered' error in PHP 7.1 when freeshipping coupon used
2017-09-12 21:33:43 -04:00
mitraval192
2ee59801c2
added secure link
2017-09-11 17:24:55 +05:30
Joel Rowley
521bde2fba
Bugfix: coupon object cache not being cleared upon deletion
2017-09-09 22:47:25 -04:00
claudiulodro
ccade24ce5
Only set some fields on new orders
2017-09-07 13:50:47 -07:00
Mike Jolley
891d29dede
Calling init manually causes issues.
2017-09-07 11:50:12 +01:00
Claudio Sanches
f6375b64d7
Removed old test
2017-09-06 20:25:41 -03:00
Claudio Sanches
d0f9b1061e
Unit tests
2017-09-05 16:52:20 -03:00
Mike Jolley
1e9e6c461f
Unit test for #16653
2017-08-31 11:42:19 +01:00
Claudio Sanches
6dc58b4f6a
Allow select visibility in product shortcodes
...
Ref #15979
2017-08-29 18:29:29 -03:00
Mike Jolley
7e76b87039
Merge pull request #16596 from woocommerce/fix/16594
...
Manual coupons support
2017-08-29 13:46:13 +01:00
Mike Jolley
fe847630b2
Tests when tax is not enabled
2017-08-29 12:38:35 +01:00
Mike Jolley
fb64e77f24
No tax tests
2017-08-29 12:32:02 +01:00
Mike Jolley
dc9c14d574
Ex tax tests
2017-08-29 12:17:18 +01:00
Claudio Sanches
acad44e3c9
Auto map legacy attributes to the new ones
2017-08-28 17:45:56 -03:00
Claudiu Lodromanean
c36a6811c5
Merge pull request #16600 from woocommerce/feature/15979
...
Introduces WC_Shortcode_Products class
2017-08-28 10:33:35 -07:00
Claudio Sanches
a97eb40c2c
Removed empty unit test
2017-08-25 20:29:35 -03:00
Claudio Sanches
32ea76f09f
Render product_attribute shortcode results with WC_Shortcode_Products
2017-08-25 19:07:10 -03:00
Claudio Sanches
ddeea547b1
Use WC_Shortcode_Products inside featured_products shortcode
2017-08-25 18:42:02 -03:00
Claudio Sanches
72df581c6f
Use WC_Shortcode_Products inside top_rated_products shortcode
2017-08-25 15:55:34 -03:00
Mike Jolley
97390eaf6e
Tests
2017-08-25 18:21:29 +01:00
Mike Jolley
be4ae42a59
Tests
2017-08-25 16:15:32 +01:00
Claudio Sanches
c0da59d75a
Use WC_Shortcode_Products inside best_selling_products shortcode
2017-08-25 11:46:47 -03:00
Claudio Sanches
366686c34a
Fixed unit tests for PHP 5.2 and 5.3
2017-08-25 11:01:25 -03:00
Claudio Sanches
3dabdda480
Apply WC_Shortcode_Products class into sale_products shortcode
2017-08-25 11:00:48 -03:00
Claudio Sanches
0cea847c63
Renamed $loop_name to $type
2017-08-24 22:22:42 -03:00
Claudio Sanches
d7bea55aae
Use WC_Shortcode_Products to render product shortcode results
2017-08-24 22:16:42 -03:00
Claudio Sanches
013da90f51
Included unit test for recent_products shortcode
2017-08-24 21:38:42 -03:00
Claudio Sanches
461066d2b1
Allow query products by category on products shortcode
2017-08-24 21:24:05 -03:00
Claudio Sanches
429aecd400
Allow set loop name
2017-08-24 20:20:14 -03:00
Claudio Sanches
57379938b5
WC_Shortcode_Products unit tests
2017-08-24 20:12:12 -03:00
Josh Smith
49c7449e8b
Merge remote-tracking branch 'upstream/master'
2017-08-23 22:41:04 +00:00
Mike Jolley
4c2c051773
Merge pull request #16575 from woocommerce/fix/arraysubsettest
...
Harden + fix plugin updates tests
2017-08-23 11:02:06 +01:00
Mike Jolley
22813663d7
Merge pull request #16569 from woocommerce/update/fees-api-class
...
WC_Cart_fees and negative fee calculations
2017-08-23 10:59:19 +01:00
Josh Smith
d2d4489c68
[ #12517 ] Add messages for unit test assertions in tests with multiple assertions
2017-08-23 03:23:25 +00:00
Josh Smith
868a0e0e84
Merge remote-tracking branch 'upstream/master'
2017-08-23 02:33:01 +00:00
claudiulodro
b8af7164db
Harden + fix plugin updates tests
2017-08-22 15:03:54 -07:00
claudiulodro
577e8f0e2b
Formatting
2017-08-22 14:08:26 -07:00
claudiulodro
1215da6355
WC_Cart_Fees tests
2017-08-22 14:06:33 -07:00
claudiulodro
e83758fe38
Cart fee tests
2017-08-22 13:26:55 -07:00
Claudio Sanches
7ad0dd55f9
Allow import 'menu_order'
2017-08-22 17:22:39 -03:00
Claudio Sanches
0b3811bd11
Change Position key from 'position' to 'menu_order'
2017-08-22 16:46:09 -03:00
Claudio Sanches
af23ad42d7
Included "position" (menu_order) to exported products
2017-08-22 16:33:19 -03:00
Mike Jolley
aaf4c4b134
fix tests
2017-08-22 13:24:29 +01:00
Mike Jolley
d68291b3ac
Merge pull request #16086 from woocommerce/improvement/versions
...
Extensions version check.
2017-08-21 18:18:04 +01:00
Mike Jolley
1d38a92638
Fix test
2017-08-21 12:38:14 +01:00
Josh Smith
413444c616
Merge remote-tracking branch 'upstream/master'
2017-08-20 04:09:17 +00:00
Claudiu Lodromanean
b0f190fa1d
Merge pull request #16517 from woocommerce/integrate-cart-sessions-class
...
Integrate cart sessions, getters and setters
2017-08-18 08:41:57 -07:00
Mike Jolley
1c8ad67a9e
Fix tests and tax merges
2017-08-18 15:05:01 +01:00
Mike Jolley
b854c1775c
Tests
2017-08-18 13:53:22 +01:00
Mike Jolley
e99471c0cd
Removed manual discounts code
2017-08-18 10:36:10 +01:00
Claudio Sanches
b86e78b53e
Webhook CRUD Unit tests
2017-08-17 18:36:53 -03:00
Claudio Sanches
fad774267c
Merge branch 'master' into feature/16445
2017-08-17 13:32:47 -03:00
Claudio Sanches
e31da15959
Improve test_wc_load_webhooks() checking when returns false
2017-08-17 12:32:30 -03:00
Claudio Sanches
8c120da100
Test webhook functions
2017-08-17 12:29:34 -03:00
Claudio Sanches
0ac915d0e9
Removed legacy webhook unit tests
2017-08-17 12:07:15 -03:00
Mike Jolley
cd15e18e68
Fix failing test
2017-08-17 15:45:26 +01:00
claudiulodro
ae80d12d80
Merge master
2017-08-14 11:12:09 -07:00
Mike Jolley
33be0b5741
Remove todos
2017-08-14 16:44:59 +01:00
Claudio Sanches
b8b9ae41f0
Fixed importer unit tests
2017-08-11 21:46:51 -03:00
claudiulodro
6fa0e7a8f5
Update test
2017-08-11 11:27:11 -07:00
Josh Smith
ae8a797961
[ #12517 ] Use ISO 8601 time format to convert timestamps to WC_DateTime for PHP 5.2 compat
2017-08-11 04:50:44 +00:00
Josh Smith
115d19ca30
[ #12517 ] Adding Unit Tests for WC_Customer_Download_Log and new download log tracking
2017-08-11 04:35:18 +00:00
claudiulodro
591b71ecbc
Add some tests
2017-08-10 14:37:40 -07:00
claudiulodro
3618ef1725
Handle couple todos
2017-08-10 13:37:05 -07:00
Mike Jolley
23660b9c68
test
2017-08-10 11:46:00 +01:00
Mike Jolley
06381f28bd
Edit items rather than recreate
2017-08-10 11:38:09 +01:00
claudiulodro
a2b208d5b8
Include failing test
2017-08-09 15:00:13 -07:00
Mike Jolley
140771e759
Merge branch 'master' into improvement/versions
...
# Conflicts:
# assets/css/admin-rtl.css
# assets/css/admin.css
# assets/css/helper-rtl.css
# assets/css/helper.css
# assets/css/twenty-seventeen-rtl.css
# assets/css/twenty-seventeen.css
# assets/css/wc-setup-rtl.css
# assets/css/wc-setup.css
2017-08-09 10:08:06 +01:00
claudiulodro
e89bef3d52
Update tests to handle related plugins
2017-08-08 10:31:06 -07:00
Mike Jolley
e9c3ebebdc
Merge branch 'master' into feature/discounts-class
...
# Conflicts:
# includes/abstracts/abstract-wc-data.php
# woocommerce.php
2017-08-08 15:49:59 +01:00
Mike Jolley
3778918a0a
Merge branch 'master' into pr/14751
...
# Conflicts:
# includes/class-wc-structured-data.php
2017-08-08 15:28:31 +01:00
Mike Jolley
ce93599b5c
Test correction
2017-08-08 09:30:11 +01:00
Mike Jolley
f7c4cf82d8
Fix subtotal unit tests
2017-08-08 09:24:03 +01:00
claudiulodro
c8a7ac8940
Unit tests
2017-08-07 14:31:58 -07:00
Claudiu Lodromanean
dd094088b0
Merge pull request #16336 from woocommerce/fix/16241
...
Only return tax classes if product is taxable.
2017-08-07 10:02:02 -07:00
Mike Jolley
7a829036c2
Fix tests
2017-08-07 17:49:46 +01:00
Mike Jolley
5e2ce54530
update tests
2017-08-07 17:19:19 +01:00
claudiulodro
ce25737026
Remove test for method that doesnt exist any more
2017-08-02 13:37:27 -07:00
claudiulodro
9a1eaab449
Add test for 16305
2017-08-02 11:41:52 -07:00
claudiulodro
80708255ee
Fix inc tax price calculation
2017-08-02 11:07:33 -07:00
claudiulodro
e1fad0d7eb
Bring up to date with master
2017-07-28 14:27:19 -07:00
claudiulodro
e335724c50
Finalize product query
2017-07-28 11:59:44 -07:00
claudiulodro
a721ab064e
Update WC_Discount tests
2017-07-28 09:59:24 -07:00
Mike Jolley
c16df62b54
Fix tests and bootstrap
2017-07-28 17:43:08 +01:00
claudiulodro
e67ae14739
Tests are working again!
2017-07-28 08:53:23 -07:00
Mike Jolley
14717d4ebb
fix call to apply_coupon_fixed_cart_remainder
2017-07-28 16:33:02 +01:00
Mike Jolley
c7cb46a524
Fix array shift usage
2017-07-28 16:31:11 +01:00
Mike Jolley
9170b61a1c
fix in cents logic direction.
2017-07-28 16:17:57 +01:00
Mike Jolley
e23e55bb27
Methods for getting specific totals and discounts whilst keeping storage in a single array
2017-07-28 15:35:41 +01:00
Mike Jolley
51fbb1aec3
set_items_from_cart
2017-07-28 13:02:39 +01:00
claudiulodro
b56b87c97b
Good progress on wc_discount and manual discount handling
2017-07-27 14:08:38 -07:00
claudiulodro
409320482a
Get everything working again
2017-07-27 10:37:20 -07:00
claudiulodro
0aa9894bae
Merge remote-tracking branch 'origin/feature/discounts-class' into HEAD
2017-07-27 09:32:08 -07:00
claudiulodro
b2e42fb55f
Add visibility test
2017-07-27 08:57:44 -07:00
Mike Jolley
795d8fa2fd
Tests
2017-07-27 15:46:02 +01:00
Mike Jolley
ded2be8d28
Legacy filters
2017-07-27 15:31:10 +01:00
Mike Jolley
6054519605
Discount taxes
2017-07-27 13:48:58 +01:00
Mike Jolley
306db69eaf
Remove order subclass
2017-07-27 10:49:47 +01:00
claudiulodro
d15a2f5f6a
Make tax calculation optional
2017-07-26 13:46:50 -07:00
claudiulodro
ea0bd7980a
Get order totals working
2017-07-26 12:06:05 -07:00
Mike Jolley
b9b4336c1b
Removed some duplicate keys
2017-07-26 16:50:34 +01:00
Mike Jolley
1faae6a7aa
Order subclass
2017-07-26 14:32:43 +01:00
Mike Jolley
250dabaf41
WC_Cart_Totals subclass
2017-07-26 12:44:06 +01:00
Mike Jolley
698c3b9e1b
Fix tests
2017-07-26 11:32:10 +01:00
Mike Jolley
58b54673d1
Merge pull request #16256 from woocommerce/feature/discounts-coupon-validation
...
Add coupon validation logic to WC_Discounts
2017-07-26 10:21:56 +01:00
Claudio Sanches
f0dfff4a86
Sync with feature/discounts-class
2017-07-25 22:41:18 -03:00
Claudio Sanches
2573adedd5
Moved coupon validation logic to WC_Discounts
2017-07-25 22:36:41 -03:00
claudiulodro
dfee2c0cbe
Maybe integrate cart and total classes
2017-07-25 14:44:54 -07:00
claudiulodro
ec6d11bd67
Just needs visibility support and cleanup
2017-07-25 10:01:24 -07:00
Mike Jolley
b68adf748b
Tests pass
2017-07-25 17:25:06 +01:00
Mike Jolley
4960bf0ca4
Update discount tests
2017-07-25 16:27:57 +01:00
Mike Jolley
474799889f
Disable discounts tests until rewritten
2017-07-25 15:57:58 +01:00
Mike Jolley
4c4f26ff41
Changes to allow shipping to be calculated from totals class
...
Moved some items from
https://github.com/woocommerce/woocommerce/pull/11889/files to support
this.
2017-07-25 15:11:32 +01:00
Mike Jolley
e8e200195f
fees pass
2017-07-25 14:05:49 +01:00
claudiulodro
cdbead8961
Clean up and tests
2017-07-24 15:05:23 -07:00
Mike Jolley
ee545e7793
Totals progress
2017-07-24 17:21:08 +01:00
Mike Jolley
45a9826a80
Totals class and tests files
2017-07-23 12:05:11 +01:00
Mike Jolley
83b60573fa
Framework for discount class
2017-07-21 14:22:40 +01:00
Mike Jolley
e5ec0e66e3
fixed discount
2017-07-20 20:33:27 +01:00
Mike Jolley
0e96bd8a93
Discount rows
2017-07-20 17:34:30 +01:00
Claudio Sanches
84be2dd6bb
Fixed declaration of WC_Tests_CRUD_Data::onNotSuccessfulTest
2017-07-20 13:32:47 -03:00
Mike Jolley
06c1a2ad8d
apply discount
2017-07-20 14:33:38 +01:00
Mike Jolley
1b63749a68
Tests for other coupon types
2017-07-19 16:21:35 +01:00
Mike Jolley
f77fc21785
test_get_applied_coupons
2017-07-19 16:17:58 +01:00
Mike Jolley
3c12a06c46
Limit to x
2017-07-19 13:49:22 +01:00
Mike Jolley
baa7efcc30
Another test
2017-07-19 12:27:50 +01:00
Mike Jolley
dd7fe5f158
More tests and precision fixes
2017-07-19 12:26:01 +01:00
Mike Jolley
d24faebea8
Split fixed cart from other discounts in class.
2017-07-18 20:42:47 +01:00
Mike Jolley
37fbd96de8
Small tidyup
2017-07-18 18:52:50 +01:00
Mike Jolley
2b9e3aafdd
fix endless loop of death
2017-07-18 18:47:05 +01:00
Mike Jolley
6a9e612a83
Some progress on actual discounts
2017-07-18 18:07:46 +01:00
Mike Jolley
cc8eb28724
Set items based on cart or an order, with tests
2017-07-18 15:42:46 +01:00
Mike Jolley
31d535c932
Methods and tests
2017-07-18 14:04:56 +01:00
claudiulodro
f66198c37d
Initial working wc_get_products
2017-07-14 09:50:20 -07:00
Claudio Sanches
1b93282245
Change note to content
2017-07-13 19:30:25 -03:00
Claudio Sanches
940019f245
Merge pull request #16103 from jconroy/api-terms-page-data
...
Add the "Terms and conditions" page to the api system status pages property
2017-07-13 15:17:48 -03:00
Mike Jolley
6d65be1264
Merge pull request #16099 from woocommerce/feature/15982
...
Order note helper functions
2017-07-13 11:22:02 +01:00
Jason Conroy
d3dd9292fe
Update api unit tests to check for 5 pages
2017-07-13 16:27:16 +10:00
Caleb Burks
ed55ae0117
Fix “risky” tests
...
WC_Tests_API_Functions::test_wc_rest_check_post_permissions
This test did not perform any assertions
WC_Tests_API_Functions::test_wc_rest_check_user_permissions
This test did not perform any assertions
WC_Tests_API_Functions::test_wc_rest_check_product_term_permissions
This test did not perform any assertions
WC_Tests_API_Functions::test_wc_rest_check_manager_permissions
This test did not perform any assertions
2017-07-12 23:06:38 -05:00
Claudio Sanches
54d0d23f94
Order note helper tests
2017-07-12 18:46:52 -03:00
claudiulodro
7be2c7dc55
More tests
2017-07-12 14:18:51 -07:00
claudiulodro
753979ec49
WC_Product_Query
2017-07-12 13:58:39 -07:00
Mike Jolley
2fdb78a5b0
Update test to reflect new text
2017-07-12 16:18:43 +01:00
Mike Jolley
022c528b3e
Remove value renaming code
2017-07-12 15:18:05 +01:00
Websupporter
057c8b3281
Fix typo in test
...
Just a quick typo fix.
2017-07-11 14:43:54 +03:00
Daniel Rey Lopez
04a83b0faa
Change the "Rest of the World" zone name to "Locations not covered by your other zones" everywhere
2017-07-11 08:19:42 +01:00
Claudiu Lodromanean
1699a9769f
Merge pull request #16020 from woocommerce/feature/12273
...
New attribute helper functions
2017-07-10 13:20:59 -07:00
claudiulodro
03403b2c44
Allow times in date fields
2017-07-10 09:19:59 -07:00
Akeda Bagus
53807185a8
Fixed typos.
...
These typos are catched by `misspell` program.
```
find . -type f | grep -v assets | grep -v dummy-data | grep -v i18n | grep -v node_modules | grep -v .git | grep -v apigen | xargs misspell -w
```
Some results were excluded because of 3rd party ownership and non-english
sentences.
2017-07-10 12:56:28 +07:00
Claudio Sanches
e10c27f9bd
Attributes helpers unit tests
2017-07-07 18:50:27 -03:00
claudiulodro
863193bd34
Fix linting problems
2017-07-06 11:12:02 -07:00
Claudio Sanches
bf91127682
Merge pull request #15788 from woocommerce/fix/13353
...
Clean up user is_paying_customer after deleting an order
2017-07-04 16:26:45 -03:00
Mike Jolley
b9757cca00
leave objects alone rather than slashing in the meta api
...
Has tests. Prevents notices when you pass an object to add_meta_data.
2017-07-04 16:09:21 +01:00
Trey Richards
f019070307
Fixed major issue with getting orders when both before_date and after_date args are set.
...
Modified unit tests to prevent from happening again.
2017-06-30 17:30:16 -07:00
Mike Jolley
77c938202f
Merge branch 'add/15602-store-street-level-address'
...
# Conflicts:
# assets/css/admin-rtl.css
# assets/css/admin.css
2017-06-30 15:00:51 +01:00
Mike Jolley
4f66d214fa
Merge pull request #15829 from woocommerce/fix/15725
...
Use type check in coupon constructor
2017-06-29 22:42:43 +01:00
claudiulodro
f5d5890a50
Add tests
2017-06-29 14:05:38 -07:00
Brent Shepherd
1992d90d37
Revert "Merge pull request #14706 from crodas/make_get_item_consistent"
...
This reverts commit 56ffa3d2aa
, reversing
changes made to 64a60de24f
.
2017-06-27 22:28:23 -07:00
Mike Jolley
dd25736d64
Clean up user is_paying_customer after deleting an order
2017-06-26 18:32:36 +01:00
Allen Snook
25c9219849
Add unit tests for new address city and postcode fields
2017-06-19 13:12:39 -07:00
claudiulodro
1d3c4ebb4d
Add flag for timeout checking
2017-06-14 11:35:22 -07:00
claudiulodro
86c43459fc
Update test
2017-06-14 11:08:39 -07:00
claudiulodro
62064d56f8
Add edge case test
2017-06-13 14:00:12 -07:00
claudiulodro
f1a9dbc69e
Extra checks and tests
2017-06-13 13:32:21 -07:00
claudiulodro
f020d54e67
Add support for paginate and return ids in wc_order_query
2017-06-12 13:26:29 -07:00
claudiulodro
384e8d85f4
Finish user func tests
2017-06-09 11:37:28 -07:00
claudiulodro
ddd86bcff4
Good progress on user func tests
2017-06-08 14:30:23 -07:00
claudiulodro
cdd24bf8e1
Increase country unit test coverage
2017-06-07 14:31:32 -07:00
Claudio Sanches
e86232032f
Fixed tests for wc_rest_urlencode_rfc3986()
2017-06-06 17:43:40 -03:00
Mike Jolley
4c7f8c0fbd
Revert thousand removal in wc_format_decimal, and add more tests
2017-06-06 12:44:58 +01:00
Cesar Rodas
c96c62f380
Improved how taxes are applied
...
If by default the taxes are based on the shipping address and the current order doesn't have any, it would use the billing address rather than using the Shopping base location.
It's basically what WooCommerce is [doing already in Javascript](https://github.com/woocommerce/woocommerce/blob/master/assets/js/admin/meta-boxes-order.js#L526-L575 ). This kind of checks should be done in the backend, never in the client side.
2017-06-01 15:51:55 -04:00
Cesar Rodas
b0f3b5a19d
Added test_get_meta_data_cache_invalidation_array_to_scalar() unit tests
2017-06-01 12:03:13 -04:00
Claudio Sanches
bc3c7f6bbd
Merge branch 'master' into fix/15315
2017-05-31 11:59:49 -03:00
Claudio Sanches
d9e946491f
Merge pull request #15357 from woocommerce/fix/15274-meta
...
Add ability to invalidate cache by object ID
2017-05-31 11:53:53 -03:00
Cesar Rodas
c59566759c
Merge remote-tracking branch 'origin/master' into improve_meta_data_updates
2017-05-31 09:41:41 -04:00
Cesar Rodas
0d1451b719
Fixed coding styles
2017-05-31 09:40:29 -04:00
Mike Jolley
21300951f1
Fix tests due to generated names
2017-05-31 13:48:28 +01:00
Mike Jolley
532ddfa6b0
Merge conflicts
2017-05-31 12:23:52 +01:00
Mike Jolley
56ffa3d2aa
Merge pull request #14706 from crodas/make_get_item_consistent
...
Make get item consistent
2017-05-31 11:10:09 +01:00
Claudio Sanches
51ddc36080
Skip empty attributes and reset indexes
2017-05-30 19:26:31 -03:00
Claudio Sanches
611695b9f4
Updated and fixed importer unit tests
2017-05-30 17:58:34 -03:00
Claudio Sanches
0f79138b17
Included download name and URL into the sample.csv
2017-05-30 15:01:43 -03:00
Claudio Sanches
18e903df15
Updated unit test sample.csv
2017-05-30 14:26:16 -03:00
Mike Jolley
11d7189ed3
Unit test showing the issue
2017-05-30 14:12:11 +01:00
Mike Jolley
4ea9138d3e
Code and test improvements
2017-05-30 11:54:31 +01:00
Cesar Rodas
bf095190c4
Improved data unit tests
2017-05-29 12:51:12 -04:00
Claudio Sanches
6287176741
Updated sample.csv data
2017-05-26 20:05:41 -03:00
Ninos Ego
9f56561905
Typo
2017-05-26 20:21:35 +02:00
Ninos Ego
b0dc827f0a
CS & small fix in unit test
2017-05-26 20:15:57 +02:00
Ninos Ego
e7b3aa352a
Added: Unit test
2017-05-26 19:43:50 +02:00
Mike Jolley
67dde58d83
Tests
2017-05-26 16:00:32 +01:00
claudiulodro
c08140a293
Formatting
2017-05-25 14:45:36 -07:00
claudiulodro
e00d7b7c55
File metadata by id
2017-05-25 14:43:36 -07:00
claudiulodro
df06d6f942
Merge remote-tracking branch 'origin/feature/product-csv-import-export' into HEAD
2017-05-25 12:41:26 -07:00
claudiulodro
a99d7ff099
Exporter tests and tweaks
2017-05-25 12:33:14 -07:00
Mike Jolley
ba305eacb5
Fix tests
2017-05-25 18:16:10 +01:00
claudiulodro
6d098b9c21
Clean up and some tests
2017-05-25 08:41:11 -07:00
Mike Jolley
d2da39e046
Merge branch 'pr/14549'
2017-05-25 11:51:55 +01:00
Mike Jolley
7ec25f987f
Only replace the user set thousand separator and add test
2017-05-25 11:51:45 +01:00
Kelly Dwan
0a265b53a2
Add display_name to customer data store
2017-05-24 13:57:11 -04:00
Mike Jolley
f866f164eb
Merge pull request #15244 from woocommerce/improvement/15187
...
Order query unit tests and fixes.
2017-05-24 12:03:40 +01:00
Claudio Sanches
3fbaa8607a
Fixed unit tests for WC_Product_CSV_Importer
2017-05-24 03:44:27 -03:00
claudiulodro
4faad7d964
Finish unit tests and bugfixes
2017-05-23 18:44:37 -07:00
Cesar Rodas
dafc795d7c
Abstracting the WC_Meta_Data Properties with __set/__get
2017-05-23 19:15:13 -04:00
Cesar Rodas
b158ba2c47
Merge remote-tracking branch 'origin/master' into improve_meta_data_updates
2017-05-23 17:34:12 -04:00
claudiulodro
52fc3ad4c6
Good progress on order unit tests
2017-05-23 06:55:28 -07:00
Claudio Sanches
f294447543
Fixed unit tests
2017-05-19 19:18:09 -03:00
Timon Davis
af308da6b9
Fix bug #15103 where site operator cannot assign a variation with value of '0' as the default choice on the customer facing form.
...
The WC_Product::set_default_attributes function uses an array_filter (using the default callback for filtration)
to remove null and false values from the defaults array for a given product. The issue here is that, in the above use case,
the array_filter will evaluate '0' as 0 and therefore as false. Ultimately, array_filter then prevents the value from being
recorded, moving forward.
I've added a new filter callback to includes/wc-attribute-functions which will disregard all FALSE PHP equivalents except for
'0' (as a a string). Also, I've updated the filter_array call in WC_Product::set_default_attributes so that it uses this new callback,
instead of the PHP default. Finally, I've added a phpunit test to assert that, when storing default variations / attributes on a product,
the false/true PHP synonyms are evaluating and storing like one would normally expect, with the exception that (string) '0'
evaluates as true in this special case.
This solution could potentially be broadened to facililate similar rules elsewhere, but the need raised in the bug is specific and
this is a specific solution.
2017-05-18 02:43:14 -07:00
Mike Jolley
3d5f1c1fe6
Merge branch 'feature/product-csv-import-export' into feature/csv-importer
2017-05-17 10:36:39 +01:00
Claudio Sanches
8f1eb262e3
Updated importer tests
2017-05-16 01:42:55 -03:00
Claudio Sanches
020e61927b
Created abstract product class
2017-05-16 01:02:46 -03:00
Claudio Sanches
c375fa03ff
Disable importer tests for now
2017-05-15 20:43:53 -03:00
Claudio Sanches
09cf382d29
Initial code to create/update in the CSV importer
2017-05-15 20:23:44 -03:00
Claudio Sanches
121f8f6315
Abstract the product importer
2017-05-15 19:49:53 -03:00
Justin Shreve
0c5588aac7
Makes sure that the 'base location' setting is returned to the /settings/general endpoint correctly. It uses a special setting type that the API didn't handle properly.
2017-05-15 10:21:06 -07:00
claudiulodro
824d8898a2
Fix unit tests
2017-05-12 08:44:02 -07:00
claudiulodro
fc365d29eb
Change test to better check validity
2017-05-10 13:20:07 -07:00
claudiulodro
93835f69db
New working date query format
2017-05-09 14:49:45 -07:00
claudiulodro
c89e389b3f
Good progress towards better date queries
2017-05-09 11:37:45 -07:00
Claudio Sanches
58fa8542b6
Merge pull request #14933 from woocommerce/fix/14815
...
Use numeric, not decimal
2017-05-08 15:36:39 -03:00
Mike Jolley
24fe8db5eb
Fix test
2017-05-08 19:14:33 +01:00
Claudio Sanches
257594a67c
Merge pull request #14945 from woocommerce/pr/14875
...
Pr/14875
2017-05-08 13:56:12 -03:00
Mike Jolley
dd3be1278b
Merge pull request #14733 from woocommerce/feature/13646
...
WC_Object_Query & WC_Order_Query
2017-05-07 14:24:12 +01:00
claudiulodro
b907aa74f6
Finish parser and unit test
2017-05-04 14:20:59 -07:00
Paul Kilmurray
71e462469a
Problem in WC_Abstract_Order->get_items()
...
This only effects new items, which are given duplicate array keys, eg: `new:0`, `new:1` etc.
2017-05-04 19:12:19 +09:00
Paul Kilmurray
b5f182e14d
Problem in WC_Abstract_Order->get_items()
...
This test will fail.
If the order is created with different item types, eg: *line_item* and *fee*, they will both be given the key `new:0`. Items with duplicate keys are not combined in the `get_items` function ([line 703](https://github.com/woocommerce/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#L703 )).
2017-05-04 18:47:43 +09:00
Claudio Sanches
7b5d56c643
[REST API] Adds missing "id" in shipping zone methods endpoint
...
This missing "id" will break CLI.
Added as duplicated with `instance_id` to keep backwards compatibility.
Fixes #14831
2017-05-02 20:37:03 -03:00
Mike Jolley
4b0fff3437
Fix zone routes in CLI
...
Fixes #14750
2017-04-28 15:49:51 +01:00
claudiulodro
11c7722eff
Update tests
2017-04-27 14:46:00 -07:00
claudiulodro
027e7b1f94
Add restored webhook
2017-04-27 11:44:57 -07:00
Cesar Rodas
7a8011e878
Merge remote-tracking branch 'origin/master' into improve_meta_data_updates
2017-04-27 12:29:09 -04:00
Mike Jolley
a68934d7db
Merge pull request #14731 from crodas/make_sure_meta_data_cache_is_not_shared
...
Make sure the meta data cache is not shared among instances
2017-04-27 16:50:10 +01:00
claudiulodro
6aecb15505
Reduce scope
2017-04-27 08:38:18 -07:00
Mike Jolley
fc0f5f3765
fix test
2017-04-27 15:23:04 +01:00
Cesar Rodas
2e6dc17bd5
Improved update_meta_data function
...
Also updated unit tests that was expecting the meta data as stdclass objects
2017-04-27 09:28:19 -04:00
Cesar Rodas
91de312eb2
Make sure the meta data cache is not shared among instances
...
See #14620 for more context. In there I thought this was the desired behaviour and I enhanced it. After talking with @mikejolley he explained to me that it was not by designed.
This commit makes sure the meta data cache is not shared among instances
2017-04-26 13:51:52 -04:00
claudiulodro
9f0f0cd246
Polish and cleanup
2017-04-26 10:49:19 -07:00
Cesar Rodas
38f379a7d7
Make get_item() consistent (like get_items())
...
Right now get_item() is loading an item from the database directly. It doesn't
take advantage of our cache and it doesn't check if the item is already loaded in memory.
There is also another bug (or feature?) that it will let you load any item, even if the item is not related to the current order. I believe this is a bug, if somebody really wants to load any item regardless of the order they should use `WC_Order_Factory::get_order_item`.
Another bug is that items loaded with get_item() are not related to the order object, therefore any calls to Order::save() won't persist the changes made to the item.
This commits makes sure the item returned by get_item is loaded similarly like get_items() does, taking advantage of the cache and the $items protected property (chances are the item is already in memory, ready to be used).
If a given item is not found false will be returned. If item exists but it is not related to the current object it will return false as well (If this behaviour is wanted, I can easily change it load the item anyways instead of returning false).
2017-04-26 02:54:14 -04:00
claudiulodro
efa1dbbda5
Basic working order queries
2017-04-25 14:52:17 -07:00
Mike Jolley
a27e03378f
update test
2017-04-25 14:46:17 +01:00
claudiulodro
553a12203b
WC_Order_Query
2017-04-24 16:28:13 -07:00
claudiulodro
29fa59a0b7
WC_Object_Query
2017-04-24 11:33:17 -07:00
Mike Jolley
a325d03deb
wc_get_orders support for guest orders and unit tests
...
Fixes #14575
2017-04-20 18:05:58 +01:00
Claudio Sanches
e208e35e33
Fixed coding standards in tests
2017-04-20 01:34:58 -03:00
Mike Jolley
65b6ee58f7
Fix map URL unit test.
2017-04-17 12:10:38 +01:00
Claudio Sanches
627d7a8790
Merge pull request #14278 from woocommerce/fix/14209-alt
...
Variation Attribute Name Fixes (simplified)
2017-04-11 17:25:28 -03:00
Mike Jolley
5cfed7569c
Simplify wc_is_attribute_in_product_name and change separator
2017-04-11 21:12:30 +01:00
Claudiu Lodromanean
715656921d
wc_is_attribute_in_product_name
2017-04-10 14:35:16 -07:00
Mike Jolley
e478527c03
Fix test
2017-04-10 21:57:10 +01:00
Claudiu Lodromanean
903b176b99
Attribute title tweaks
2017-04-10 13:16:58 -07:00
Claudio Sanches
42ca7bda3d
Merge pull request #13989 from woocommerce/fix/product-meta-save_post
...
Fix saving meta when using `save_post`.
2017-04-06 14:38:16 -03:00
Justin Shreve
08537218b1
mend
2017-04-05 14:46:17 -07:00
Justin Shreve
15bf1da7d5
Call save_meta_data before wp_update_post for data stores that use it, and refresh meta cache after.
2017-04-05 14:39:41 -07:00
Claudiu Lodromanean
160d394070
Clean up test
2017-04-05 11:13:31 -07:00
Claudiu Lodromanean
5389844a1b
Use parent data for sold_individually
2017-04-05 11:02:26 -07:00
Claudio Sanches
1c369e41e0
Merge pull request #13810 from woocommerce/fix-typo
...
Fix typo
2017-03-28 15:22:45 -03:00
Claudiu Lodromanean
448d47a78c
Sprinkle some periods
2017-03-28 11:15:00 -07:00
Claudiu Lodromanean
28726570bf
Use new_* hooks instead of created_*
2017-03-28 11:05:45 -07:00
Akeda Bagus
757b5ae2c4
Fixed all typo in tests/ directory.
2017-03-29 01:02:31 +07:00
Mike Jolley
9aabe1ff44
Revert "sync before test"
...
This reverts commit 45ab4733d5
.
2017-03-28 14:32:56 +01:00
Mike Jolley
29d6f69a87
Revert "Clear parent transients on variation save"
...
This reverts commit 0694312cc9
.
2017-03-28 14:32:52 +01:00
Mike Jolley
0694312cc9
Clear parent transients on variation save
2017-03-28 13:51:22 +01:00
Mike Jolley
45ab4733d5
sync before test
2017-03-28 12:51:32 +01:00
Claudiu Lodromanean
89128da8ba
Fix child_has_dimensions
2017-03-27 11:52:03 -07:00
Mike Jolley
01408ddda6
Fixed api tests
2017-03-24 15:11:21 +00:00
Mike Jolley
819448daf5
Fix unit test
2017-03-24 11:35:54 +00:00
Mike Jolley
9af295d618
Merge pull request #13753 from woocommerce/fix/rest-api-shipping-zones-schema
...
[REST API] Fixed shipping zones schema
2017-03-24 10:38:51 +00:00
Mike Jolley
af8e892f97
Merge pull request #13759 from woocommerce/fix/rest-api-settings-links
...
[REST API] Fixed links of settings endpoint
2017-03-24 10:33:16 +00:00
Mike Jolley
803786ceeb
Merge pull request #13755 from woocommerce/fix/shipping-zone-locations-schema
...
[REST API] Fixed shipping zone locations schema
2017-03-24 10:27:52 +00:00
Mike Jolley
5cb3b9e0ea
Merge pull request #13751 from woocommerce/fix/rest-api-setting-options-rest-base
...
[REST API] Fix setting options rest base
2017-03-24 10:26:22 +00:00
Mike Jolley
0ad1f6a63f
Merge pull request #13709 from woocommerce/fix-13708
...
Timezone/DST fixes
2017-03-24 10:25:08 +00:00
Claudio Sanches
7381b008e0
[REST API] Fixed links for settings endpoint
...
Do not allow embed and updated the key to reflect the items from the endpoint response
2017-03-24 01:56:50 -03:00
Claudio Sanches
7a671ab8a5
[REST API] Fixed shipping zone locations schema
...
This also fix improper sanitization and validation of the items.
2017-03-23 21:44:46 -03:00
Claudio Sanches
c369cdc8bd
Fixed shipping zones schema unit tests
2017-03-23 20:56:41 -03:00
Claudio Sanches
b1023c23c6
Fixed setting options endpoint tests
2017-03-23 20:45:22 -03:00
Claudio Sanches
44319e20f7
[REST API] Fixed file name convention
2017-03-23 17:48:37 -03:00
Claudio Sanches
3f82db5cbd
Fixed unit tests for review GMT dates
2017-03-23 13:39:46 -03:00
Claudio Sanches
5d19bba83d
Fixed unit tests for variation image
2017-03-23 13:39:16 -03:00
Claudio Sanches
caae2d2a0f
Fixed Products_API::test_product_schema() total of properties
2017-03-23 13:38:25 -03:00
Mike Jolley
c0218188a0
Update unit tests
2017-03-23 00:11:21 +00:00
Mike Jolley
75c55c0442
Revert "Tests"
...
This reverts commit a070a7f6d6
.
2017-03-22 12:37:13 +00:00
Mike Jolley
a070a7f6d6
Tests
2017-03-22 12:36:30 +00:00
Claudio Sanches
f1dab3fdce
Fixed coding standards
2017-03-21 12:38:35 -03:00
Claudiu Lodromanean
c0a01a1fe4
Dont set empty strings as tax totals
2017-03-20 15:14:41 -07:00
Claudio Sanches
c8be89915c
Fixed double @
2017-03-15 13:46:02 -03:00
Claudio Sanches
59c2849736
Changed version 2.7 to 3.0
2017-03-15 13:36:53 -03:00
Mike Jolley
75a5b062cf
Merge pull request #13577 from woocommerce/fix-13498
...
Timezone/Date method handling
2017-03-15 16:09:41 +00:00
Mike Jolley
5b6636e5da
Unit test
2017-03-15 15:54:39 +00:00
Mike Jolley
d55653a408
Merge branch 'master' into fix-13498
...
# Conflicts:
# includes/class-wc-order.php
# tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Mike Jolley
943c507d3f
Merge pull request #13606 from woocommerce/fix-13525-api
...
Fix 13525 api
2017-03-15 15:43:45 +00:00
Mike Jolley
a34dd0480d
Merge pull request #13587 from woocommerce/fix-13525
...
Update coupon date handling
2017-03-15 15:26:41 +00:00
Claudiu Lodromanean
51b7110de2
Update API v2
2017-03-14 14:43:53 -07:00
Justin Shreve
fb124232cf
Update Payment Tokens to follow the same pattern for custom data as other object types.
...
Payment tokens was introduced in 2.6 and was updated to use the new CRUD code while some of the CRUD system was still in flux.
While most things were correct, the prop handling for custom fields (like a card's last 4 digits) were directly calling meta functions, instead of delegating to the data store/parent.
This PR moves these props to `extra_data` and follows the same pattern as product types or order items. It also updates some version tags to 3.0.0. Finally, it adds an additional test for saving meta after a create which looks like it was lacking.
To Test:
* Run `phpunit`.
* Go to the "My Account" tab and add a new payment method. You need a payment gateway that supports this, like Simplify.
* Test the add a payment method flow.
* Make a test purchase using the saved payment method.
2017-03-14 12:33:35 -07:00
Mike Jolley
a3cc5cc9bb
has_meta -> meta_exists
...
#13590
Avoid has_meta conflict with old method.
#13581
2017-03-14 16:49:13 +00:00
Claudiu Lodromanean
e929a7fd17
Cant use ::CLASS in php 5.2
2017-03-14 08:42:08 -07:00
Claudiu Lodromanean
f042305ff7
Update date_expires meta handling
2017-03-14 08:10:31 -07:00
Mike Jolley
6826dcbfe1
Tests for has_meta
2017-03-14 12:08:39 +00:00
Claudiu Lodromanean
dd0b167c7f
Remove failing test since it's duplicated elsewhere properly
2017-03-13 14:38:05 -07:00
Claudiu Lodromanean
f1925e561a
Update coupon data store to use new dates
2017-03-13 14:24:05 -07:00
Mike Jolley
d195aa6117
Fix unit tests
2017-03-13 20:35:04 +00:00
Claudiu Lodromanean
7d9227d3af
Update coupon object with new date
2017-03-13 13:31:40 -07:00
Claudio Sanches
5b798332d2
Updated customer REST API unit tests
2017-03-10 19:51:33 -03:00
Mike Jolley
38afff0031
Merge pull request #13516 from woocommerce/fix-13505
...
Make increase_usage_count work correctly on concurrent checkout
2017-03-10 19:07:57 +00:00
Mike Jolley
2c59a6a86f
Fix test
2017-03-10 18:59:55 +00:00
Mike Jolley
6ec06ef0db
Update tests
2017-03-10 14:52:41 +00:00
Mike Jolley
90b588be18
Merge branch 'master' into tests-13533
2017-03-10 12:01:41 +00:00
Mike Jolley
e2552c0a8c
Unit tests
2017-03-10 12:01:40 +00:00
Claudio Sanches
23b575aebe
Fixed customer CRUD unit tests
2017-03-10 01:53:06 -03:00
Justin Shreve
9724b67ab8
Fix order item meta functions cache busting.
...
The cache busting currently in `wc_add_order_item_meta`, `wc_update_order_item_meta`, and `wc_delete_order_item_meta` doesn't actually bust anything. The cache line looks like it is from 2.6. The relevent cache to bust is actually in the `order-items` group and has a different key/prefix.
This bug allows your meta to get out of sync if you use these functions and then try to access a value from a CRUD object.
You can see this in the `test_wc_order_item_meta_functions` test I've added. If you keep your `wc-order-item-functions.php` as is, the asserts against `$item->get_meta` will fail.
To test:
* `phpunit --filter=test_wc_order_item_meta_functions`.
* Try before applying the `wc-order-item-functions.php` changes and after.
2017-03-09 13:36:23 -08:00
Justin Shreve
cd92351dd7
Fix direct property access for coupon amount.
...
In 2.6, you could access the amount via $coupon->coupon_amount. Or legacy code incorrectly handles $coupon->amount instead. 7778583340/includes/class-wc-coupon.php (L102)
This PR handles both since the RCs and betas allowed `->amount` and I don't want to break anything that may be accessing it that way..
To Test:
* `phpunit --filter=test_coupon_backwards_compat_props_use_correct_getters`
2017-03-09 10:34:45 -08:00
Mike Jolley
6848fad224
Merge branch 'timezone-poc' into fix-13498
2017-03-09 16:10:07 +00:00
Mike Jolley
09c75cd814
More tests
2017-03-09 11:05:54 +00:00
Claudiu Lodromanean
e36ee46dea
Make increase_usage_count work correctly on concurrent checkoutt
2017-03-08 15:27:37 -08:00
Claudiu Lodromanean
b645fc5513
Docblocks
2017-03-08 12:02:14 -08:00
Claudiu Lodromanean
3b8eb75c93
Better handling of nested arrays in apply_changes
2017-03-08 11:51:38 -08:00
Mike Jolley
b5454f3403
America/New_York unit test
2017-03-08 17:44:43 +00:00
Mike Jolley
dda75c3d43
Unit tests
2017-03-08 16:52:21 +00:00
Claudiu Lodromanean
d0f47a7980
Revert to original behavior
2017-03-07 13:17:36 -08:00
Claudiu Lodromanean
955a75bf30
Fix changes and more tests
2017-03-07 11:58:02 -08:00
Claudiu Lodromanean
2436541fff
Fix individual use coupon handling
2017-03-07 11:31:20 -08:00
Claudio Sanches
e97c21c1cc
Fixed unit tests
2017-03-03 16:36:53 -03:00
Claudiu Lodromanean
d5fd1e46ee
get_meta should return empty array sometimes
2017-03-02 11:16:49 -08:00
Claudiu Lodromanean
1eafb487d7
Allow invalid data store exceptions to bubble
2017-03-01 09:24:30 -08:00
Claudio Sanches
1eccb65d85
Fixed coding standards
2017-02-24 17:30:41 -03:00
Claudio Sanches
e0cffc0934
Merge pull request #13329 from woocommerce/fix-13320
...
Delete cached object when updating stock
2017-02-23 18:20:40 -03:00
Claudiu Lodromanean
07a021760a
13320 Delete cached object when updating stock
2017-02-23 12:56:34 -08:00
Claudiu Lodromanean
252c08b943
Map legacy tax array keys to CRUD
2017-02-23 11:14:42 -08:00
Mike Jolley
4b4597524b
Added unit tests for wc_product_force_unique_sku
2017-02-23 10:05:46 +00:00
Claudio Sanches
486a81bf12
Fixed coding standards
2017-02-17 16:10:15 -02:00
Claudio Sanches
8f38924fe0
Removed filter unit tests
2017-02-17 13:43:53 -02:00
Claudio Sanches
9c15ca936b
Merge pull request #13206 from woocommerce/rest-api-v2
...
REST API v2
2017-02-16 12:53:46 -02:00
Claudio Sanches
f08c10d068
Fixed and improved the variations endpoint
2017-02-16 03:07:51 -02:00
Claudio Sanches
1d82fbd8bf
Fixed products tests
2017-02-16 01:52:10 -02:00
Claudiu Lodromanean
ba2b767006
Modify tests for PHP 5.2 compat
2017-02-15 13:50:25 -08:00
Claudiu Lodromanean
fd9d52a3f7
Modify test for PHP <5.4 compatibility
2017-02-15 12:07:35 -08:00
Claudiu Lodromanean
e8579c649c
Deprecated hook handler unit tests
2017-02-15 11:34:14 -08:00
Claudiu Lodromanean
469210b02b
Minor formatting cleanup
2017-02-13 11:47:28 -08:00
Claudiu Lodromanean
a8b491b55b
Handle product titles with no attributes
2017-02-13 11:45:25 -08:00
Claudiu Lodromanean
b6b3f0c217
Modify product title logic
2017-02-10 10:19:05 -08:00
Claudio Sanches
193fab24af
Fixed REST API coupons endpoint tests
2017-02-09 20:13:02 -02:00
Claudiu Lodromanean
a3f9207839
Add logic to variation title generation
2017-02-09 14:03:00 -08:00
Claudio Sanches
9ac1ebe748
Updated unit tests for REST API
2017-02-09 18:21:52 -02:00
Claudio Sanches
9e1e9783d2
Fixed unit tests in PHP 5.2
2017-02-09 11:33:18 -02:00
Mike Jolley
b17932f4e3
Fix test due to invalid amount and caching
2017-02-09 12:04:44 +00:00
Claudio Sanches
9b0a4e6c92
Merge pull request #13109 from woocommerce/fix-regressed-tests
...
Fix failing tests and array_merge error
2017-02-08 16:18:08 -02:00
Claudiu Lodromanean
8ce5356943
13106 Dont round values in get_on_sale_products
2017-02-07 13:46:00 -08:00
Claudiu Lodromanean
173c09dd04
Fix failing tests and array_merge error
2017-02-07 10:46:03 -08:00
Claudio Sanches
1fe705547f
Fixed REST API batch tests
2017-02-02 19:20:07 +01:00
Mike Jolley
40e9eabf9f
Merge pull request #12983 from woocommerce/get_tax_classes
...
WC_Tax::get_tax_class_slugs()
2017-01-26 14:10:04 +00:00
Justin Shreve
474a307420
Introduce get_tax_class_slugs.
2017-01-25 13:38:13 -08:00
Justin Shreve
32651f638c
When updating payment tokens, only update the props that have changed + fire off a hook of the changed props.
2017-01-25 11:05:54 -08:00
Jon Surrell
2bd8b6efbc
Validate handlers implement WC_Log_handler_Interface
...
Add tests for interface validation.
2017-01-24 23:07:58 +01:00
Claudio Sanches
09123c9fc8
Merge pull request #12926 from woocommerce/fix-12910
...
Use mb_ functions in wc_get_wildcard_postcodes
2017-01-23 15:48:59 -02:00
Mike Jolley
66914966fb
Adjust meta saving code throughout
...
#12885
2017-01-23 11:30:53 +00:00
Mike Jolley
f0049367ae
Use mb_ functions and add tests
2017-01-22 01:24:20 +00:00
Claudio Sanches
d536d15652
Merge branch 'master' of github.com:woocommerce/woocommerce
2017-01-18 16:01:02 -02:00
Claudio Sanches
f54e9e1e1a
Fixed coding standards
2017-01-18 15:16:01 -02:00
Justin Shreve
5fe996930f
Fix alignment
2017-01-17 12:55:53 -08:00
Justin Shreve
b660eda4b8
Add date searching to wc_get_orders.
2017-01-17 12:52:27 -08:00
Jon Surrell
b422de03ef
Add tests for wc_get_logger
...
When filter provided class doesn't implement
WC_Logger_Interface, test for wc_doing_it_wrong
and use WC_Logger
2017-01-14 18:45:51 +01:00
Jon Surrell
5d7665671c
Remove WC_Logger::remove
...
This method was added post 2.6 and does not need to be maintained/deprecated.
Remove related test.
2017-01-13 06:48:57 +01:00
Jon Surrell
bb1ece4c31
Add test for deprecated WC_Logger::remove
2017-01-12 22:25:02 +01:00
Jon Surrell
29b3917f0e
Test deprecated WC_Logger::clear functionality
2017-01-12 22:23:02 +01:00
Claudio Sanches
9c27661dea
Synchronized with master
2017-01-12 17:53:15 -02:00
Jon Surrell
e8fd29520f
Un-deprecate wc_get_log_file_path
2017-01-12 20:39:39 +01:00
Jon Surrell
1006fc209e
Fix DB handler tests for default source
2017-01-08 22:15:04 +01:00
Jon Surrell
acd338fb87
Add default source to WC_Log_Handler_DB
2017-01-08 21:42:56 +01:00
Justin Shreve
e4937b898d
Fix PHP 7.1 warnings/notices.
2017-01-04 10:45:45 -08:00
Justin Shreve
291a662be1
The WC API returns exclude_product_ids and expiry_date. 2.7 renamed these in the API file, which we should not do until we version the endpoints.
2017-01-03 10:25:36 -08:00
Mike Jolley
98b79ddf5b
Unit test warnings
2017-01-03 12:19:03 +00:00
Mike Jolley
5ec8ef50e6
Correct case
2017-01-03 11:57:21 +00:00
Jon Surrell
a33fac966d
Use plural in multiple log email
2016-12-29 11:58:43 +01:00
Jon Surrell
5367baeadd
Fix tests for different threshold configuration
...
No filtering by default.
Options configuration has been removed.
2016-12-29 11:58:43 +01:00
Jon Surrell
fbd91fe376
Improve email handler subject
2016-12-29 11:58:43 +01:00
Jon Surrell
4b13e3b053
Do not deprecate WC_Logger::add
2016-12-29 11:58:43 +01:00
Jon Surrell
e4d5886427
Replace log `tag` with log `source`
2016-12-29 11:58:43 +01:00
Jon Surrell
af7b8646c5
Remove unneeded setUp and tearDown
...
WC_Logger tests no longer depend on writing/reading from log files.
2016-12-29 11:58:43 +01:00
Jon Surrell
5700043e6d
Deprecate wc_get_log_file_path
...
wc_get_log_file_path moves into `WC_Log_Handler_File` class as a static
method.
Update deprecations and version info.
2016-12-29 11:58:43 +01:00
Jon Surrell
065277a596
Fix WC_Logger::add test to match new 'notice' level.
2016-12-29 11:58:43 +01:00
Jon Surrell
50eb303a73
Fix WC_Log_Levels::is_valid_level tests
...
The wrong method was being called in tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
23a45125e7
Add unit tests for wc_print_r()
...
Clean up some log logic ( `assertEquals( true ... )` becomse `assertTrue( ... )` ).
2016-12-29 11:58:43 +01:00
Jon Surrell
3f4b473a48
Improve PHP 5.2 test compatibility (older PHPUnit version)
2016-12-29 11:58:43 +01:00
Jon Surrell
b94d029546
Improve test compatibility (PHP 5.2)
2016-12-29 11:58:43 +01:00
Jon Surrell
fe837c5113
Aggregate email handler messages (max: 1 email/request/handler)
...
Update emails accordingly.
Update email handler tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
9ba616b2c1
Return single instance from wc_get_logger
...
Remove class include from wc_get_logger (should be autoloaded).
Add tests for wc_get_logger.
2016-12-29 11:58:43 +01:00
Jon Surrell
5af479f61b
Add email log handler tests
2016-12-29 11:58:43 +01:00
Jon Surrell
080cf8e436
Store log levels as integer representations in database
...
This will allow indexed ordering by severity.
Add WC_Log_Levels::get_severity_level method to translate severity
integers to level strings. The inverse of WC_Log_Levels::get_level_severity.
Add context to tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
825d9c9f82
Fix spelling
2016-12-29 11:58:43 +01:00