Gabor Javorszky
219480b329
Save the version on the property too
2016-08-31 16:21:17 +01:00
Mike Jolley
8624156144
Merge pull request #11802 from corsonr/issue_11801
...
Fixes #11801
2016-08-31 15:50:32 +01:00
Mike Jolley
19f051c7ff
Merge branch 'master' into customer-exceptions
2016-08-31 15:45:27 +01:00
Mike Jolley
d9a0d0988b
Handle meta data and fix unit tests
2016-08-31 15:43:34 +01:00
Mike Jolley
1595cc5767
remove changed
2016-08-31 13:25:13 +01:00
Gabor Javorszky
9cfa231167
Fixes reset cache and version assignment for variable product prices
...
Fixes #11812
$this->array was only used to return to the user. Comparison was done with $prices_array, which did not contain the version information because it was never saved in the transient.
2016-08-31 11:12:49 +01:00
Mike Jolley
335a5e262a
use switch in read_manual_coupon
2016-08-30 18:58:28 +01:00
Mike Jolley
62d0619b1a
Avoid legacy keys
2016-08-30 18:03:00 +01:00
Mike Jolley
7439f6d79f
Use set_props
2016-08-30 17:59:41 +01:00
Mike Jolley
047242515d
Make API and CRUD use consistent keys and make use of data
2016-08-30 17:50:35 +01:00
Mike Jolley
b82415dfa3
Handle exceptions in API
2016-08-30 15:57:45 +01:00
Mike Jolley
1d7c8d8370
Handle read with set_props
2016-08-30 14:48:29 +01:00
Mike Jolley
ee356d2f29
Add WC_Data_Exception
2016-08-30 14:34:58 +01:00
corsonr
8cb17c1923
branch conflict fix
2016-08-30 14:30:05 +02:00
Mike Jolley
c4c863ffb0
Merge pull request #11792 from WPprodigy/price-filter-fix
...
Cast as decimal when querying prices
2016-08-30 11:48:51 +01:00
Mike Jolley
499e190efb
Merge pull request #11785 from woothemes/coupon-exceptions
...
Coupon Exceptions and REST/CRUD improvements
2016-08-30 11:44:19 +01:00
Mike Jolley
df35845d4d
wc_get_coupon_id_by_code
2016-08-30 11:43:53 +01:00
Claudio Sanches
f54ada22ba
Merge pull request #11796 from webmandesign/patch-1
...
Making sure `wc_get_screen_ids` function exists
2016-08-29 14:48:06 -03:00
Justin Shreve
de4296dd15
Add some missing API pieces:
...
* Value was missing from the settings schema (but was still present in the response).
* Added delete endpoint for shipping zones.
* Corrected permissions check/error for shipping zone methods.
2016-08-29 10:22:29 -07:00
Oliver Juhas
9a0c283b10
Making sure `wc_get_screen_ids` function exists
...
This is a fix for issue #11795
2016-08-27 16:46:23 +02:00
Aristeides Stathopoulos
69e6b05205
typo fix
2016-08-27 17:10:12 +03:00
Aristeides Stathopoulos
1c2a67554b
fix typo
2016-08-27 16:56:21 +03:00
Aristeides Stathopoulos
3267ce6522
WordPress.WhiteSpace.OperatorSpacing.SpacingBefore
2016-08-27 09:16:28 +03:00
Aristeides Stathopoulos
72696901f3
WordPress.WhiteSpace.OperatorSpacing.SpacingAfter
2016-08-27 09:14:06 +03:00
Aristeides Stathopoulos
fb62d280b5
WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore
2016-08-27 09:07:42 +03:00
Aristeides Stathopoulos
e69fafbda7
WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter
2016-08-27 09:06:22 +03:00
Caleb Burks
417d707996
Cast as decimal when querying prices
2016-08-27 01:03:06 -05:00
Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
7c589cf7e1
WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis
2016-08-27 07:53:52 +03:00
Aristeides Stathopoulos
a19848978a
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis
2016-08-27 07:47:24 +03:00
Aristeides Stathopoulos
dea39df779
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis
2016-08-27 07:38:29 +03:00
Aristeides Stathopoulos
2101dae5a0
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen
2016-08-27 07:35:04 +03:00
Aristeides Stathopoulos
9543c7fe1c
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis
2016-08-27 07:29:49 +03:00
Aristeides Stathopoulos
82f3cc221e
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos
4e3c1fd865
WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine
2016-08-27 07:09:12 +03:00
Aristeides Stathopoulos
538f8e02cc
WordPress.WhiteSpace.ControlStructureSpacing.SpaceBeforeFunctionOpenParenthesis
2016-08-27 07:06:25 +03:00
Aristeides Stathopoulos
d430dabb37
Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines
2016-08-27 07:04:18 +03:00
Aristeides Stathopoulos
741f2b954a
Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
2016-08-27 07:01:22 +03:00
Aristeides Stathopoulos
56fd004a72
WordPress.Arrays.ArrayDeclaration.FirstIndexNoNewline
2016-08-27 06:56:09 +03:00
Aristeides Stathopoulos
55075ce3a4
WordPress.Arrays.ArrayDeclaration.IndexNoNewline
2016-08-27 06:35:20 +03:00
Aristeides Stathopoulos
6c30f84fa2
WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys
2016-08-27 06:23:21 +03:00
Aristeides Stathopoulos
ff852038c9
WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys
2016-08-27 06:11:30 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Aristeides Stathopoulos
478a914494
WordPress.Arrays.ArrayDeclaration.SpaceInEmptyArray
2016-08-27 05:48:53 +03:00
Aristeides Stathopoulos
72ee94d11b
WordPress.Arrays.ArrayDeclaration.SpaceBeforeComma
2016-08-27 05:46:40 +03:00
Aristeides Stathopoulos
730069db06
WordPress.Arrays.ArrayDeclaration.SpaceAfterKeyword
2016-08-27 05:39:16 +03:00
Aristeides Stathopoulos
0b0f67ad28
WordPress.Arrays.ArrayDeclaration.SpaceAfterDoubleArrow
2016-08-27 05:36:32 +03:00
Aristeides Stathopoulos
14ec612760
WordPress.Arrays.ArrayDeclaration.NoSpaceBeforeDoubleArrow
2016-08-27 05:29:01 +03:00
Aristeides Stathopoulos
58b9df6564
WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis
2016-08-27 05:23:54 +03:00
Aristeides Stathopoulos
7d571bec44
WordPress.Arrays.ArrayDeclaration.NoSpaceAfterDoubleArrow
2016-08-27 05:16:12 +03:00
Aristeides Stathopoulos
32ddc22465
WordPress.Arrays.ArrayDeclaration.NoSpaceAfterComma
2016-08-27 05:14:16 +03:00
Aristeides Stathopoulos
ec8a0b288b
PHPCS: WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast
2016-08-27 05:08:49 +03:00
Aristeides Stathopoulos
b063bcfe4c
last item in a multiline-array should end in a comma
2016-08-27 04:46:45 +03:00
Mike Jolley
8eef062079
Merge pull request #11781 from woothemes/shipping-method-api
...
Shipping Methods API
2016-08-26 16:51:55 +01:00
Mike Jolley
b0672a000a
Fixed unit tests
2016-08-26 16:44:00 +01:00
Shiva Poudel
330215db42
Check tax object name before modifying label
2016-08-26 21:14:50 +05:45
Mike Jolley
7d8bacc2b3
Missing $wpdb
2016-08-26 16:15:18 +01:00
Mike Jolley
f034e1f69d
Exception handling and REST optimisation
2016-08-26 15:42:42 +01:00
Mike Jolley
3ff41ceea4
No need to add meta since CRUD handles this
2016-08-26 15:26:05 +01:00
Mike Jolley
5c40236d79
Fixes notices
2016-08-26 15:24:01 +01:00
Mike Jolley
ed01282340
Made data match schema
2016-08-26 15:20:44 +01:00
Mike Jolley
210763e536
use CRUD in admin
2016-08-26 14:50:17 +01:00
Mike Jolley
b4746e28cf
Optimise read_manual_coupon
2016-08-26 13:13:50 +01:00
Justin Shreve
849a208e54
Fix issues based on feedback. Make sure to use WC_Shipping_Zone's methods when avaiable, fix up some coding standards, and add a new delete_shipping_method to WC_Shipping_Zone
2016-08-26 04:57:30 -07:00
Mike Jolley
69c48db0a8
Correct ids method
2016-08-26 12:53:02 +01:00
Mike Jolley
cd81622d15
Read props
2016-08-26 12:52:22 +01:00
Mike Jolley
7405053a6a
Add exceptions
2016-08-26 12:33:33 +01:00
Mike Jolley
48243109c0
This is ran on set
2016-08-26 12:23:53 +01:00
Mike Jolley
c6d0d059fd
Remove typecasts on get
2016-08-26 12:22:05 +01:00
Mike Jolley
4cf54e445b
Merge pull request #11777 from leewillis77/feature/wc_attribute_label_optimisation
...
Use wc_get_attribute_taxonomies() in wc_attribute_label()
2016-08-26 11:27:06 +01:00
Mike Jolley
6b6c856cc7
Filter the template path
...
Closes #11774
2016-08-26 11:03:08 +01:00
Mike Jolley
f5cc89eec2
Merge pull request #11762 from woothemes/WC_Data_Exception
...
WC Data Exceptions
2016-08-26 10:57:41 +01:00
Mike Jolley
bd2e8ce0cc
Remove returns
2016-08-26 10:54:18 +01:00
Mike Jolley
9bd57414c5
Remove set and get prop - no longer need the extra overhead since functions won't return wp_error now.
2016-08-26 10:48:17 +01:00
Justin Shreve
147c18c197
Add the ability to update/create/delete shipping method instances
2016-08-25 20:34:26 -07:00
Justin Shreve
3ceb189118
Add GET /shipping_methods and GET /shipping_methods/METHOD_ID
...
Also adds tests.
2016-08-25 11:48:17 -07:00
Lee Willis
9a1aa1fd93
Use get_the_terms instead of wp_get_post_terms to take advantage of caching
2016-08-25 18:26:37 +01:00
Mike Jolley
461ec4da16
Return false instead of throwing exception
2016-08-25 17:48:36 +01:00
Mike Jolley
627b08ba37
Test coverage
2016-08-25 17:42:47 +01:00
Lee Willis
e3d5419b97
Use wc_get_attribute_taxonomies() in wc_attribute_label()
...
Currently wc_attribute_label() runs a SQL query every time it is called,
with no caching. Swap to using wc_get_attribute_taxonomies() which gives
us transient caching of the underlying data.
2016-08-25 17:34:18 +01:00
Mike Jolley
658970cbc8
No string required here
2016-08-25 17:12:32 +01:00
Mike Jolley
885231baba
yoda
2016-08-25 17:10:59 +01:00
Mike Jolley
4ea396aab1
When deleting a tax rate class, remove its rates
...
Closes #11759
2016-08-25 15:58:30 +01:00
Mike Jolley
1e037684eb
[2.6] Rest of the world ID 0 zone handling
...
Fixes #11688 Using NULL rather than 0 as default so rest of the world
can be treated different to a new zone. Prevents dupes.
2016-08-25 15:41:47 +01:00
Mike Jolley
1f1868195b
Write context error
2016-08-25 14:32:28 +01:00
Mike Jolley
b4e05154d7
Error handling for adding items
2016-08-25 14:22:27 +01:00
Mike Jolley
7f87800d8d
Fix save order item function
2016-08-25 13:50:37 +01:00
Mike Jolley
3637814b92
Revert use of default_data for default args and just set that in constructor
2016-08-25 13:31:03 +01:00
Mike Jolley
25883f8687
Set_props helper to load data from DB and handle errors
2016-08-25 13:05:27 +01:00
Mike Jolley
077f57f139
Merge branch 'master' into WC_Data_Exception
2016-08-25 11:03:14 +01:00
Mike Jolley
d936dfa87e
[2.6] Allow has_shipping_method to deal with instance ids
...
Fixes #11772
2016-08-25 10:58:11 +01:00
Mike Jolley
3c13ce6fcd
[2.6] Handle object when generate_cart_id is used.
...
Closes #11767
2016-08-25 10:58:11 +01:00
Mike Jolley
2d30e8469f
Merge pull request #11768 from WPprodigy/recently-viewed-widget-sorting
...
Sort “Recently Viewed” products by the view order
2016-08-25 10:48:07 +01:00
Mike Jolley
aa0078de8f
Merge pull request #11769 from WPprodigy/nav-menus-metabox
...
Nav menus metabox
2016-08-25 10:47:40 +01:00
Mike Jolley
543fc31d81
Fix filter and unit test
...
#11771
2016-08-25 10:45:50 +01:00
Mike Jolley
95db2f26cd
Set meta to 'null' to delete it during save.
...
Fixes #11771
2016-08-25 10:32:42 +01:00
Caleb Burks
a3524c95f3
Filter instead of action
2016-08-24 18:26:14 -05:00
Caleb Burks
dc876749cc
Rename taxonomies at Appearance > Menus > Pages
2016-08-24 18:22:47 -05:00
Caleb Burks
306e1dfa39
Sort “Recently Viewed” products by the view order
...
orderby ‘post__in’, and reverse the array so the most recently viewed product shows up on top.
2016-08-24 17:46:23 -05:00
Claudio Sanches
d4d1a95f21
Merge pull request #11765 from woothemes/system-status-tools-options
...
Remove checkbox options in system status tools
2016-08-24 14:19:19 -03:00
Claudio Sanches
16e386c873
Merge pull request #11757 from woothemes/get-coupon-code-by-id
...
Get coupon code by
2016-08-24 14:18:23 -03:00
Mike Jolley
0667c1cde1
Remove option based tools
2016-08-24 17:35:13 +01:00
Mike Jolley
84487d0f4b
Shipping debug mode moved to shipping settings
2016-08-24 16:55:34 +01:00
Mike Jolley
2dc3e5252f
Made WC_TEMPLATE_DEBUG_MODE a constant only
2016-08-24 16:46:07 +01:00
Mike Jolley
26c4b3ce13
Delete if qty = 0
2016-08-24 16:09:39 +01:00
Mike Jolley
a8dc46cfdf
Default line item data
2016-08-24 16:06:35 +01:00
Mike Jolley
938361535f
Exception handling
2016-08-24 16:02:19 +01:00
Mike Jolley
cde78abed3
Working on catching errors
2016-08-24 15:26:35 +01:00
Mike Jolley
d9798f7226
Set reading to prevent exceptions during DB load
2016-08-24 14:37:19 +01:00
Mike Jolley
7e30e8dda3
Set defaults and handle order reads without exceptions
2016-08-24 12:34:19 +01:00
Mike Jolley
53f01b52a8
Bring back WC_Data_Exception
2016-08-24 10:46:29 +01:00
Mike Jolley
c839944d46
Revert "Remove exception class"
...
This reverts commit 7c271e5dc5
.
2016-08-24 10:20:58 +01:00
Claudio Sanches
c8726cc42b
Fixed method return value in write context
...
cc @justinshreve
2016-08-24 01:50:12 -03:00
Claudio Sanches
3633960165
Removed dead global variables
2016-08-23 20:02:38 -03:00
Claudio Sanches
00b2e43250
DRY
2016-08-23 20:00:30 -03:00
Claudio Sanches
4513e33031
Introduces the wc_get_coupon_code_by_id() function
2016-08-23 19:52:14 -03:00
Claudio Sanches
5e069a4f4e
Merge pull request #11756 from woothemes/update/coupon-api-crud
...
Update Coupon API to use CRUD
2016-08-23 19:51:27 -03:00
Justin Shreve
77088a4a22
Coupon ID will also be an integer, so we can switch the prepare statement to expect that
2016-08-23 13:55:21 -07:00
Mike Jolley
b727acd96e
Implement get and set prop methods
2016-08-23 18:48:48 +01:00
Mike Jolley
e08e5a816d
2d array handling
2016-08-23 15:49:34 +01:00
Mike Jolley
2636d04ba6
Setters
2016-08-23 15:25:50 +01:00
Mike Jolley
b1bd1c2227
Fee
2016-08-23 15:02:57 +01:00
Mike Jolley
3e3e35d50d
Add set prop/get prop helper, error handler, and validation to item product class
2016-08-23 14:58:44 +01:00
Mike Jolley
7c271e5dc5
Remove exception class
2016-08-23 13:43:35 +01:00
Mike Jolley
74c96e305b
Error method
2016-08-23 13:43:26 +01:00
Mike Jolley
aa5fee3372
Merge pull request #11752 from corsonr/issue_11751
...
Fix issue 11751
2016-08-23 10:35:21 +01:00
corsonr
f430c23cdc
fix issue 11751
2016-08-23 11:16:38 +02:00
Multidots
41d079f086
Fixes add reply-to to admin emails ref #11630
2016-08-23 13:09:27 +05:30
Multidots
c7fc7cce07
Merge branch 'master' of https://github.com/nishitlangaliya/woocommerce
2016-08-23 12:41:22 +05:30
Claudio Sanches
2407a880f7
Updated the default colors for emails to match the Woo Style Guide
...
Closes #11748
cc @jameskoster
2016-08-22 20:59:56 -03:00
Justin Shreve
a243829db6
Convert Coupon Controller to use CRUD operations
2016-08-22 15:06:21 -07:00
Justin Shreve
7da590e422
Coupon Tests:
...
* Move tests for legacy endpoints to a legacy test folder.
* Create a test class to test the WC-API coupons endpoint.
2016-08-22 13:50:32 -07:00
Claudio Sanches
eb55096a32
Allow oAuth1.0a authentication using headers
2016-08-22 17:39:41 -03:00
Claudio Sanches
7a0c5bc19b
REST API expect meta data ID as an integer value
...
cc @mikejolley
2016-08-22 16:59:03 -03:00
Claudio Sanches
38e1be71eb
ID first for all elements in the REST API
...
cc @mikejolley
2016-08-22 16:58:34 -03:00
Claudio Sanches
0da91bb7d7
Merge pull request #11746 from woothemes/crud-meta-id
...
Swaps meta_id for id across crud and api
2016-08-22 16:43:57 -03:00
Mike Jolley
f34f1aa635
Simplify prepare_line_items logic
2016-08-22 19:58:30 +01:00
Mike Jolley
39f4a1cdca
Swaps meta_id for id across crud and api
2016-08-22 19:37:34 +01:00
Mike Jolley
169780d31b
woocommerce-message--success
...
Followed
https://github.com/woothemes/woocommerce/wiki/CSS-SASS-coding-guidelines
-and-naming-conventions
Closes #11722
2016-08-22 18:41:38 +01:00
Mike Jolley
2cea613566
Fix shipping meta save
...
#11601
2016-08-22 18:07:52 +01:00
Mike Jolley
a8e47992a6
Put back add_product for convenience. Fix unit tests.
2016-08-22 18:00:52 +01:00
Mike Jolley
3d696266d2
Set_address
2016-08-22 17:03:59 +01:00
Mike Jolley
7cf75f5085
Remove use of deprecated functions
2016-08-22 16:57:54 +01:00
Mike Jolley
95b11606fc
get_product_from_item -> get_product
2016-08-22 16:51:24 +01:00
Mike Jolley
c88984eb0e
Replace add methods
2016-08-22 16:48:19 +01:00
Mike Jolley
e079895c08
Set rate in one go for tax rate items
2016-08-22 14:52:03 +01:00
Mike Jolley
fc2e039882
Deprecate add_product etc
...
#11601
2016-08-22 14:51:53 +01:00
Mike Jolley
09e43cf797
read only refunded by
2016-08-22 13:15:15 +01:00
Mike Jolley
fdd7e797ba
API get refunds
2016-08-22 13:15:15 +01:00
Mike Jolley
9e45927803
Create refund with crud
2016-08-22 13:15:15 +01:00