Mike Jolley
889cf64ac4
Merge branch 'performance/wc-get-product-class'
2019-02-07 13:34:18 +00:00
Claudiu Lodromanean
2d2d7a7053
Merge pull request #22613 from woocommerce/performance/set-props
...
Performance: `set_props`
2019-02-06 10:02:54 -08:00
Mike Jolley
00b48febac
Merge branch 'update/versioned-transients-alt'
2019-02-06 13:18:50 +00:00
Mike Jolley
cb4bf5d1e5
Fix unit tests
2019-02-06 12:44:24 +00:00
Frédéric Demarle
03a60fddfc
Ignore WordPress.DB.PreparedSQL.NotPrepared
2019-02-06 10:24:41 +01:00
Frédéric Demarle
6e4854b3aa
Add filter woocommerce_update_product_stock_query
2019-02-05 20:29:45 +01:00
Mike Jolley
250e9ff423
Merge pull request #22609 from woocommerce/fix/22545
...
add DAY_IN_SECONDS to cron sale price removal check for consistency with #22189
2019-02-05 11:00:35 +00:00
Ron Rennick
249bf99df5
phpcs sniff fixes for class-wc-product-data-store-cpt.php
2019-02-04 12:55:21 -04:00
Ron Rennick
e64914bb3c
add DAY_IN_SECONDS to cron sale price removal check for consistency with #22189
2019-02-04 12:54:33 -04:00
Mike Jolley
893b33973c
Merge branch 'fix/22147'
2019-02-04 13:05:40 +00:00
Mike Jolley
fe2e70d7dc
Merge pull request #22392 from woocommerce/fix/checkout-shipping-address-20975
...
For logged in customers, pull default address fields from customer object, not session object
2019-02-04 11:23:03 +00:00
Mike Jolley
a16c677baf
Missing _price
2019-01-30 16:20:23 +00:00
Mike Jolley
8e51ab2fcd
Set props using one get_post_meta call
2019-01-30 16:20:17 +00:00
Mike Jolley
23b0fdbc1f
Fix id usage
2019-01-30 16:11:44 +00:00
Mike Jolley
57ccde6643
get_product_type cache
2019-01-30 16:11:29 +00:00
Mike Jolley
59e0867afe
Add missing post_password prop
2019-01-30 16:01:54 +00:00
Mike Jolley
7c0273fa12
Prime caches when reading variations
2019-01-28 15:00:48 +00:00
Mike Jolley
43ba62dc86
Merge pull request #22067 from Prospress/fix/22046
...
populate default variation attributes when it is the first variation
2019-01-22 17:29:54 +00:00
Mike Jolley
ebac35e2c5
Merge pull request #22324 from Prospress/fix/21380
...
update variation guid with the id after creation
2019-01-22 13:07:42 +00:00
Mike Jolley
83aa070654
Merge pull request #22412 from woocommerce/fix-minor-issues-in-webhook-class
...
Fix minor issues in WC_Webhook_Data_Store class
2019-01-22 12:51:42 +00:00
Mike Jolley
6367d19615
phpcs
2019-01-21 08:11:40 -08:00
Mike Jolley
e91f3b88f5
Merge pull request #22448 from woocommerce/fix/21580
...
Multisite - Load customer data for logged in users regardless of being member of sub-site
2019-01-21 14:21:21 +00:00
Mike Jolley
d3ac50d47f
Remove heavy queries from transient cleanup function
...
Remove heavy queries from transient cleanup function
Removes unneccessary loops and heavy queries.
There is a parent update and cache clear which was added in #17141 . This cleanup is handled in `update_attributes` so doing it again here should be unneccessary.
Finally, the layered nav cleanup here can be moved. #22029 notes that this was needed in case of a stock change affecting product visibility. If we move to the data store, we can avoid getting the product here which is slower.
2019-01-21 13:02:31 +00:00
Mike Jolley
7744879326
wc_delete_product_transients for parent
2019-01-21 13:01:18 +00:00
Mike Jolley
08d7e319b6
Version handling for var prices
2019-01-21 12:56:55 +00:00
Brent Shepherd
2ed2572afe
Clear webhook transients when status changes
...
Background discussion: https://github.com/woocommerce/woocommerce/pull/21427#discussion_r246881785
2019-01-18 14:30:35 +10:00
Brent Shepherd
28ca9f1ec4
Remove unused $wpdb
2019-01-18 14:30:35 +10:00
Brent Shepherd
21d724c65d
PHPCS fixes
...
Add fixes required for Travis to pass the PR, but which aren't
related to the PR diff.
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
f86b738db3
Use search_webhooks()
...
To avoid duplicate SQL
2019-01-18 14:29:34 +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
Mike Jolley
4fc197c67d
Merge pull request #21003 from Chunkford/patch-2
...
Giving the ability to add custom pricing data - read_price_data()
2019-01-16 15:22:40 +00:00
Mike Jolley
f68a547f53
Don't mix session and customer data
2019-01-15 16:49:01 +00:00
Mike Jolley
4dbee72c65
Merge pull request #22165 from woocommerce/fix/22089
...
Add new pre query filter to WC_Product_Data_Store_CPT::search_products()
2019-01-14 17:02:51 +00:00
Mike Jolley
1b337dea64
Load customer data regardless of current blog
2019-01-14 16:30:47 +00:00
Mike Jolley
5016e4c858
Removed unused query
2019-01-11 16:56:51 +00:00
Mike Jolley
938992cbae
Exit early, add back fallback code
2019-01-11 16:52:57 +00:00
Mike Jolley
da80c154fc
Query tweaks
2019-01-11 16:48:05 +00:00
Mike Jolley
4bda1c9cad
Code style improvements
2019-01-11 15:52:43 +00:00
Matthew Rochow
7c50a29d2d
Update class-wc-product-data-store-cpt.php
2019-01-11 14:47:41 +00:00
Matthew Rochow
07b2bcc726
Update class-wc-product-data-store-cpt.php
2019-01-11 14:47:41 +00:00
Matthew Rochow
01d7eaf92f
Update class-wc-product-data-store-cpt.php
...
Updating find_matching_product_variation() function to be faster
2019-01-11 14:47:41 +00:00
Rodrigo Primo
c15d622dd2
WC_Data::get_id() does not take any parameters
...
This commit removes a parameter from a call to WC_Data::get_id() as this method does not take any parameters
2019-01-10 17:10:13 -02:00
Rodrigo Primo
609430a8f1
Remove unused parameter from WC_Webhook_Data_Store::delete()
2019-01-10 17:08:41 -02:00
Rodrigo Primo
3cf945d5d9
Fix PHPCS errors automatically using phpcbf
2019-01-10 17:07:53 -02:00
Mike Jolley
e31b35597a
Slash meta values to preserve slashes on save
2019-01-08 13:28:26 +00:00
Mike Jolley
fb9847bcca
Merge pull request #21853 from rellect/incorrect_call
...
Remove non existent parameter
2019-01-07 12:47:40 +00:00
Ron Rennick
1a02e9f64a
update variation guid with the id after creation
2019-01-02 14:26:08 -04:00
Ron Rennick
50b36e549f
phpcsw sniff fixes for class-wc-product-variable-data-store-cpt.php
2018-12-13 14:35:24 -04:00
Ron Rennick
36c220f0d6
fix merge conflicts, add missing wpdb::prepare
2018-12-13 14:21:25 -04:00
Claudiu Lodromanean
6e457799b3
Merge pull request #21943 from woocommerce/fix/21516
...
Match array keys on lowercase keys before calling set_props
2018-12-11 11:12:22 -08:00
Rodrigo Primo
522f992bfe
Add new pre query filter to WC_Product_Data_Store_CPT::search_products()
...
This commits adds a filter to WC_Product_Data_Store_CPT::search_products() to let third-party code define custom ways to search for products.
2018-12-06 16:08:10 -02:00
Ron Rennick
f9b2ff170f
add missing wpdb::prepare calls
2018-11-30 15:52:20 -04:00
Ron Rennick
ef23f0bb8f
fix phpcs passing array arguments to wpdb::prepare
2018-11-29 14:52:52 -04:00
Peter Fabian
9389cf4089
Added storing attribute values as post_excerpt for variations.
...
This allows searching for variations by their attributes without cluttering the Variation's title.
2018-11-29 17:33:16 +01:00
Ron Rennick
9e520af93e
populate default variation attributes when it is the first variation
2018-11-28 11:40:35 -04:00
Ron Rennick
042c61cc5d
fix phpcs sniffs in class-wc-product-variable-data-store-cpt.php
2018-11-28 11:22:07 -04:00
Rodrigo Primo
6ec2b26972
Update WordPress.DB.PreparedSQL.NotPrepared sniff name
...
The latest version of WPCS that was added to WC last week, changed the name of some sniffs. This commit updates the name of one of those sniffs from WordPress.WP.PreparedSQL.NotPrepared to WordPress.DB.PreparedSQL.NotPrepared.
2018-11-23 15:10:52 -02:00
Rodrigo Primo
57f44798cb
Fix phpcs violations automatically using phpcbf
2018-11-23 12:57:51 -02:00
Gerhard
b071855632
Some PHPCS fixes
2018-11-16 12:17:33 +02:00
Gerhard
3943ec6395
Convert array keys to lower case before comparing keys to exclude.
2018-11-16 12:13:51 +02:00
Refael Iliaguyev
e5a8df36e3
Remove non existent parameter
2018-11-07 17:16:57 +02:00
Gerhard
2aa39507f7
Do not include products who's parents are not in publish status to be part of the get_on_sale_products results
2018-11-01 12:01:59 +02:00
Rodrigo Primo
fce22a705f
Reapply change made in c765ce644d
...
Reverting commit 61c7abc
in commit ece9f02776
, overrode a unrelated change made to the same code in another PR by commit c765ce644d
. This commit simply reapplies this change.
2018-10-29 16:34:48 -03:00
Rodrigo Primo
ece9f02776
Revert "First pass at using post_author instead of the post meta '_customer_user'"
...
This reverts commit 61c7abce4f
.
2018-10-29 11:48:44 -03:00
Rodrigo Primo
be4132e228
Revert "Set post_author to 0 for refund orders"
...
This reverts commit ad4304450d
.
2018-10-29 11:47:00 -03:00
Rodrigo Primo
ff7e307b6b
Revert "Make sure post_author is used only after WC 3.3.0 DB upgrade routine is executed"
...
This reverts commit 997a6fa40d
.
2018-10-29 11:46:33 -03:00
Rodrigo Primo
487ac201c0
Revert "Bump WC version to 3.4.0"
...
This reverts commit 7f43c39f2f
.
2018-10-29 11:44:32 -03:00
Rodrigo Primo
1d9ab63134
Revert "Punt to WC version 3.5.0"
...
This reverts commit ccf10f6ab2
.
2018-10-29 11:37:24 -03:00
Rodrigo Primo
37c796487d
Revert "Update WC_Customer_Data_Store to use post_author instead of _customer_user"
...
This reverts commit 482e844f16
.
2018-10-29 11:09:13 -03:00
Rodrigo Primo
e47ebfaafb
Revert "Update WC_Order_Data_Store_CPT::get_wp_query_args() to use post_author instead of _customer_user"
...
This reverts commit 8db3236889
.
2018-10-29 11:08:53 -03:00
JeroenSormani
7b4075f11a
Ensure wp_list_pluck() gets a array and not possibly null
2018-10-16 18:53:31 +02:00
Claudio Sanches
61873627a7
Merge branch 'master' into feature/rest-api-v3
2018-09-10 19:16:22 -03:00
Claudio Sanches
2fcabfe7e6
/reports/coupons/totals endpoint
2018-09-08 21:04:13 -03:00
Jack Boyle
63b84ef407
Fix Requested Changes
...
Changed to check if field exists and the field is not blank.
2018-08-24 13:03:09 +10:00
Jack Boyle
fd33f2c2a6
Added Tests
...
Added Tests for new wildcard functionality.
2018-08-23 15:23:35 +10:00
Jack Boyle
c4eda39177
Add wildcard handler for SKU and other meta values
...
Add wildcard handler for SKU and other meta values
2018-08-23 09:59:39 +10:00
Chunkford
1b49a2d545
Update class-wc-product-variable-data-store-cpt.php
2018-08-08 12:45:03 +01:00
Chunkford
c9f60f7669
Update class-wc-product-variable-data-store-cpt.php
2018-08-08 12:31:38 +01:00
Chunkford
a3c826c1e4
Giving the ability to add custom price data
...
I need a way to add my own pricing data to the variation data store, so I can check which price to display on the product and category pages, So instead of adding unnecessary load by leading each variation object to extract the data and meta I need, this gives me a way to get the data through the data store which in turns uses transients instead.
2018-08-07 22:39:05 +01:00
Claudiu Lodromanean
d32a675c25
Merge pull request #20931 from woocommerce/fix/download-log-data-store
...
Fix: orderby and order parameters in WC_Customer_Download_Log_Data_Store::get_download_logs()
2018-08-04 07:57:17 -07:00
Rodrigo Primo
b09bb3eee9
Fix: orderby and order parameters in WC_Customer_Download_Log_Data_Store::get_download_logs()
...
This commit fixes a bug in WC_Customer_Download_Log_Data_Store::get_download_logs() that made impossible to change the order in which the query returned the results. This method accepts the arguments order_by and order, but it was ignoring them and always using the default values ('download_log_id' and 'ASC' respectively).
It also introduces a very basic unit test to cover the method main functionality and to make sure that the parameters order and orderby are not ignored anymore.
It seems that the modified method was inspired in WC_Customer_Download_Data_Store::get_downloads() before the same bug was fixed in #18620 .
2018-07-30 16:40:21 -03:00
Kanishk
4fc06834b6
Fix for #20904
2018-07-26 15:12:28 +05:30
Joey Gilham
58cdd7dad2
Merge branch 'master' into master
2018-07-03 15:41:15 +01:00
Joey
cd8416122f
removed low stock options for variations, and addressed changes
2018-06-19 12:40:27 +01:00
Rodrigo Primo
43d22a2349
Merge branch 'master' into update/use-post-author-for-customer-id
2018-06-18 15:17:19 -03:00
Claudiu Lodromanean
ee47ceb361
Merge pull request #20537 from woocommerce/update/transactions-revert
...
Transactions, caching, and version transient cleanup issues
2018-06-15 09:11:23 -07:00
Claudiu Lodromanean
c203ff16d9
Merge pull request #20482 from woocommerce/fix/20452
...
Avoid price setting when synced with children
2018-06-15 09:05:13 -07:00
Mike Jolley
a0eb6843c2
define limit query
2018-06-15 15:28:29 +01:00
Mike Jolley
78636b1f12
Only cache if order ID is set.
2018-06-14 14:52:25 +01:00
Rodrigo Primo
dd8bf8b522
Merge branch 'master' into update/use-post-author-for-customer-id
2018-06-11 10:44:14 -03:00
Mike Jolley
5e14953796
Avoid price setting when synced with children
2018-06-11 11:44:58 +01:00
Mike Jolley
4bc7841325
search_products limit support
2018-06-09 17:23:07 +01:00
Khan M Rashedun-Naby
5442d30b6d
Checking Improved
2018-06-07 12:35:58 +06:00
Joey
b08b55a651
added changes for low stock notifications per product
2018-05-27 05:40:58 +01:00
Mike Jolley
8bcf32c68d
Merge pull request #19981 from timothyjensen/coupon-usage-count-hooks
...
Add coupon usage count hooks
2018-05-24 17:16:17 +01:00
Mike Jolley
58e4802f47
Set date created if null during update
2018-05-15 19:15:42 +01:00
Rodrigo Primo
c49059ce7a
Merge branch 'master' into update/use-post-author-for-customer-id
2018-05-08 17:34:09 -03:00
Rodrigo Primo
8db3236889
Update WC_Order_Data_Store_CPT::get_wp_query_args() to use post_author instead of _customer_user
2018-05-08 17:21:57 -03:00
Rodrigo Primo
482e844f16
Update WC_Customer_Data_Store to use post_author instead of _customer_user
2018-05-07 17:54:42 -03:00
Tim Jensen
e2cc3673b2
Add coupon usage count hooks
...
These action hooks allow developers to extend functionality related to updating coupon usage counts.
2018-05-06 07:09:59 -04:00
Boro Sitnikovski
d8d2f03a50
Introduce GDPR export/erase for customer tokens
2018-05-03 09:46:07 +02:00
Claudio Sanches
a55ae32530
Merge pull request #19935 from woocommerce/update/19815
...
Hook doc update
2018-05-02 13:29:23 -03:00
Mike Jolley
06ef8c8589
Hook doc update
2018-05-02 14:28:53 +01:00
Mike Jolley
e807c6151f
Merge branch 'master' into update/erasure-requests
2018-05-02 14:06:47 +01:00
Mike Jolley
2e78259452
Compatibility with 4.9 branch
2018-05-02 11:45:02 +01:00
Mike Jolley
f59acf1350
Merge branch 'master' into update/erasure-requests
2018-05-01 13:46:53 +01:00
Mike Jolley
8e0f0cbc29
Lazy load children and attributes for variable products
2018-05-01 11:57:00 +01:00
Mike Jolley
c765ce644d
Inactive account handling
2018-04-30 15:38:45 +01:00
Claudiu Lodromanean
08088f15a9
Merge pull request #19858 from rnaby/250418-221130-wc-customer-data-store
...
Removed redundant else statement and inverted the early return
2018-04-26 11:21:41 -07:00
Boro Sitnikovski
d6b4ca980c
Add support for arrays when building meta query args
2018-04-26 16:49:49 +02:00
Khan M Rashedun-Naby
c174316bf8
Removed redundant else statement and inverted the early return
2018-04-25 22:21:21 +06:00
Boro Sitnikovski
e891e3ed7d
Support payment_method_in when selecting orders
2018-04-25 01:40:29 +01:00
Mike Jolley
29961b540a
Fix up query
2018-04-18 12:04:53 +01:00
Mike Jolley
9dfb91835e
Merge branch 'master' into update/gdpr-order-cleanup
2018-04-18 11:21:43 +01:00
claudiulodro
f9e45bea91
Bring up-to-date with master and resolve merge conflicts
2018-04-17 13:27:39 -07:00
Mike Jolley
314d949d2c
Background process to cleanup
2018-04-17 15:21:03 +01:00
Rodrigo Primo
ccf10f6ab2
Punt to WC version 3.5.0
2018-04-17 11:12:46 -03:00
Mike Jolley
93d20d9c93
Data removal handling
2018-04-13 18:03:02 +01:00
Mike Jolley
eb6d230d38
Export downloads and logs
2018-04-13 17:00:26 +01:00
Mike Jolley
965712a1d7
Data removal for accounts/guests
2018-04-13 15:35:03 +01:00
Mike Jolley
3f2d8e8eef
delete_by_user_id method for customer downloads
2018-04-13 15:07:58 +01:00
Mike Jolley
73709ee7cd
Slash meta values before updating the DB in the data store
2018-04-10 14:43:38 +01:00
Rodrigo Primo
a7d2c5dd6e
Merge branch 'master' into update/use-post-author-for-customer-id
2018-04-03 15:13:07 -03:00
Claudio Sanches
d043e4727b
Merge pull request #19595 from woocommerce/fix/19562
...
Trigger post modified update when saving products and variations, but no other product data
2018-04-03 12:23:10 -03:00
Mike Jolley
2ed018d542
Trigger post modified update when saving products and variations, but no other product data
...
Closes #19562
2018-04-03 12:51:58 +01:00
Frédéric Demarle
ee2140944c
add action woocommerce_before_delete_{$post_type}
2018-03-29 14:52:19 +02:00
Mike Jolley
6539b7913e
Merge branch 'master'
2018-03-19 18:05:36 +00:00
Mike Jolley
40b831f4df
Missing $like was breaking unit tests.
...
@rodrigoprimo
2018-03-19 17:36:36 +00:00
Mike Jolley
eb26221b1a
Merge branch 'master' into update/19061
2018-03-16 13:59:05 +00:00
Mike Jolley
3df5a479f9
Add post_excerpt to product search
2018-03-15 11:21:27 +00:00
Mike Jolley
06418f67e5
Merge pull request #19225 from roylindauer/17355-SplitAndFilter
...
Split layered nav transient per issue #17355
2018-03-14 12:50:54 +00:00
Roy Lindauer
33cfed8e47
ensure that cache is deleted
2018-03-13 15:37:09 -07:00
Mike Jolley
a5a6d02f86
Fix null check introduced by phpcs changes
2018-03-13 11:57:51 +00:00
Mike Jolley
906aa97aea
Merge branch 'master' into update/19061
2018-03-12 19:28:53 +00:00
Mike Jolley
f0aa07fbf7
Case insensitive or handling
2018-03-12 19:18:13 +00:00
Roy Lindauer
6fba320040
Delete tax specific transients
2018-03-12 10:57:14 -07:00
Rodrigo Primo
37ca7faf2e
Check if there is a customer ID set before calling get_user_by()
2018-03-09 09:34:26 -03:00
Rodrigo Primo
818819d0ff
Rename class-wc-order-item-product-store.php to class-wc-order-item-product-data-store.php
...
To match WP coding standards
2018-03-08 16:30:33 -03:00
Rodrigo Primo
9765733597
phpcs fixes in includes/data-stores/class-wc-webhook-data-store.php
2018-03-08 16:29:22 -03:00
Rodrigo Primo
0ebf90b50e
phpcs fixes in includes/data-stores/class-wc-order-item-product-store.php
2018-03-08 16:29:11 -03:00
Rodrigo Primo
db26ae5fa0
phpcs fixes in includes/data-stores/class-wc-order-item-fee-data-store.php
2018-03-08 16:28:49 -03:00
Rodrigo Primo
67ab320a90
phpcs fixes in includes/data-stores/class-wc-order-item-data-store.php
2018-03-08 16:28:40 -03:00
Rodrigo Primo
1e32f09560
phpcs fixes in includes/data-stores/class-wc-order-item-coupon-data-store.php
2018-03-08 16:28:31 -03:00
Rodrigo Primo
231328e112
phpcs fixes in includes/data-stores/class-wc-order-data-store-cpt.php
2018-03-08 16:28:16 -03:00
Rodrigo Primo
6e2dfbf56c
phpcs fixes in includes/data-stores/class-wc-customer-download-log-data-store.php
2018-03-08 16:28:05 -03:00
Rodrigo Primo
74879abeb3
phpcs fixes in includes/data-stores/class-wc-customer-data-store.php
2018-03-08 16:27:54 -03:00
Rodrigo Primo
e3175a2e02
phpcs fixes in includes/data-stores/class-wc-customer-data-store-session.php
2018-03-08 16:27:42 -03:00
Rodrigo Primo
5eda520170
phpcs fixes in includes/data-stores/class-wc-coupon-data-store-cpt.php
2018-03-08 16:27:31 -03:00
Rodrigo Primo
2b84b7c38d
phpcs fixes in includes/data-stores/abstract-wc-order-item-type-data-store.php
2018-03-08 16:27:17 -03:00
Rodrigo Primo
03c202f1f5
phpcs fixes in includes/data-stores/abstract-wc-order-data-store-cpt.php
2018-03-08 16:27:03 -03:00
Rodrigo Primo
4ef9e8d725
PHPCS fixes includes/data-stores/class-wc-shipping-zone-data-store.php
2018-03-08 15:33:27 -03:00
Rodrigo Primo
26b5524df1
PHPCS fixes in includes/data-stores/class-wc-product-variation-data-store-cpt.php
2018-03-08 15:33:15 -03:00
Rodrigo Primo
71043bdc0e
PHPCS fixes in includes/data-stores/class-wc-product-variable-data-store-cpt.php
2018-03-08 15:33:02 -03:00
Rodrigo Primo
74f2810cf6
PHPCS fixes in includes/data-stores/class-wc-product-grouped-data-store-cpt.php
2018-03-08 15:32:48 -03:00
Rodrigo Primo
efccead01e
PHPCS fixes in includes/data-stores/class-wc-payment-token-data-store.php
2018-03-08 15:32:36 -03:00
Rodrigo Primo
0572ab5e7a
PHPCS fixes in includes/data-stores/class-wc-order-refund-data-store-cpt.php
2018-03-08 15:32:23 -03:00
Rodrigo Primo
ff1e23e660
PHPCS fixes in includes/data-stores/class-wc-order-item-tax-data-store.php
2018-03-08 15:31:55 -03:00
Rodrigo Primo
e7cfddad35
PHPCS fixes in includes/data-stores/class-wc-order-item-shipping-data-store.php
2018-03-08 15:31:43 -03:00
Rodrigo Primo
d945ece8fa
PHPCS fixes in includes/data-stores/class-wc-data-store-wp.php
2018-03-08 15:31:19 -03:00
Rodrigo Primo
fee648f696
Fix phpcs violations in includes/data-stores/class-wc-product-data-store-cpt.php
2018-03-08 14:30:48 -03:00
Rodrigo Primo
2b5103c849
Fix phpcs violations using phpcbf
2018-03-08 14:30:43 -03:00
Mike Jolley
b4579bb502
Merge branch 'master' into update/16912
2018-03-01 16:38:04 +00:00
Mike Jolley
f162fdb9d1
Merge branch 'master' into update/17795
2018-03-01 12:13:14 +00:00
Rodrigo Primo
56cb3d2d4f
Check if download ID is valid before running query
2018-02-28 13:41:11 -03:00
Rodrigo Primo
0f79567d06
Merge branch 'master' into update/improve-get-downloads
2018-02-28 13:34:11 -03:00
Mike Jolley
391e5df40c
Support for OR operator
2018-02-27 19:45:45 +00:00
Mike Jolley
c0c4348123
Use wp_search_stopwords filter
2018-02-27 19:22:15 +00:00
Mike Jolley
a1ea88ffb0
Fix comparison
2018-02-22 18:46:34 +00:00
Mike Jolley
93d36814e2
phpcs
2018-02-22 18:30:49 +00:00
Mike Jolley
a15c1611e0
Stopword support
2018-02-22 18:22:55 +00:00
Mike Jolley
f49491809f
Merge pull request #19078 from woocommerce/fix/17606
...
Display name input on My Account page
2018-02-22 12:29:58 +00:00
Mike Jolley
304922087d
Merge pull request #18984 from woocommerce/update/18981
...
Made get_on_sale_products respect the setting to hide outofstock products
2018-02-22 12:23:57 +00:00
Mike Jolley
69816b9854
Merge pull request #18538 from woocommerce/update/16366
...
Optimise saving of orders
2018-02-22 12:20:14 +00:00
Claudio Sanches
c0e29d0cbe
Merge branch 'fix/17606' into add/17606
2018-02-21 21:34:38 -03:00
Mike Jolley
472e64270a
Check parent status when seeing if variation is purchasable.
2018-02-20 12:34:33 +00:00
Mike Jolley
7c61f05bb1
Merge pull request #18620 from woocommerce/fix/get-downloads-order-by
...
Fix: properly set orderby and order when calling WC_Customer_Download_Data_Store::get_downloads()
2018-02-19 14:44:21 +00:00
Mike Jolley
49a74b95db
Made get_on_sale_products respect the setting to hide outofstock products
...
Closes #18981
2018-02-15 16:35:29 +00:00
Mike Jolley
b379e213c8
Allow search_products to find parent ids
2018-02-08 16:36:24 +00:00
Mike Jolley
7dd9c7fb0e
Added ability to search for all post statuses
2018-02-08 12:53:39 +00:00
Patrick Garman
fd3a39345f
Return amount refunded as a float
...
An amount refunded should be numeric, I was receiving pHP notices that a non numeric value was encountered. Seems this is something potentially new as of PHP 7.1? Is there any reason we should **not** return a float here? Any null or empty response from the SQL query would be 0, which would still be accurate for the total that was refunded for that order.
```2018/01/27 16:50:50 [error] 46797#0: *2930 FastCGI sent in stderr: "PHP message: PHP Warning: A non-numeric value encountered in /wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php on line 212
PHP message: PHP Stack trace:
PHP message: PHP 1. include() /cms/wp-admin/post.php:174
PHP message: PHP 2. do_meta_boxes() /cms/wp-admin/edit-form-advanced.php:714
PHP message: PHP 3. WC_Meta_Box_Order_Items::output() /cms/wp-admin/includes/template.php:1063
PHP message: PHP 4. include() /wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-items.php:41```
2018-01-27 17:07:20 -06:00
Rodrigo Primo
9c4c006baa
Fix: set orderby and order when calling WC_Customer_Download_Data_Store::get_downloads()
...
This commit fixes a bug in WC_Customer_Download_Data_Store::get_downloads() that made impossible to change the order in which the query returned the results. This method accepts the arguments `order_by` and `order` but it was ignoring them and always using the default values ('permission_id' and 'ASC' respectively).
One of the assertions of the WC_Customer_Download_Data_Store::get_downloads() test method was modified to make sure the code now works.
This bug was introduced by commit a443419
.
2018-01-26 15:55:13 -02:00
Peter Westwood
0b19427d1d
Order: Make note of two more meta keys that we store for an order.
2018-01-23 19:27:20 -07:00
Rodrigo Primo
1195cf9eee
Improve WC_Customer_Download_Data_Store::get_downloads() performance
...
This commit improves WC_Customer_Download_Data_Store::get_downloads() performance by changing the way the SQL query is built. Before this change, this method would get all table fields even when just the permission_id field is returned. Now the method will get from the database only the fields that will be returned. The fields retrieved from the database can be controlled using the parameter `$args['return']`:
- 'objects' (default): all fields are retrieved from the database and an array of WC_Customer_Download objects is returned.
- 'ids': gets and return only permision_ids
- comma separated list of fields (new option added by this commit): gets and return only the required fields. Examples: 'user_email,download_id,order_id' or 'order_id,download_count'.
2018-01-22 17:25:26 -02:00
Rodrigo Primo
16c9bc9694
Fix PHPCS violations in class-wc-customer-download-data-store.php
2018-01-22 15:16:59 -02:00
Mike Jolley
24efb439fb
Order items should only save changes.
2018-01-19 14:36:08 +00:00
Mike Jolley
c64c726da9
Set instance id
2018-01-15 14:49:55 +00:00
Mike Jolley
054e68a047
Instance ID methods
2018-01-15 14:31:05 +00:00
Mike Jolley
58efd51a9c
phpcs
2018-01-15 12:24:05 +00:00
Rodrigo Primo
7f43c39f2f
Bump WC version to 3.4.0
2018-01-09 15:42:13 -02:00
Rodrigo Primo
bf5c6f17a7
phpcs fixes
2018-01-09 15:42:08 -02:00
Rodrigo Primo
9de8478b42
Merge branch 'master' into update/use-post-author-for-customer-id
2018-01-09 15:21:12 -02:00
Rodrigo Primo
aad2c83994
Remove unused variables
...
This commit removes two unused variables from WC_Product_Data_Store_CPT class.
2018-01-03 16:00:28 -02:00
Rodrigo Primo
22f1e549ef
Manually fixes remaining coding standard violations
2018-01-03 15:57:33 -02:00
Rodrigo Primo
a2b8e38a61
Fix coding standards violations automatically using phpcbf
2018-01-03 15:27:48 -02:00
Claudiu Lodromanean
20f698db2b
Merge pull request #18219 from woocommerce/fix/18197
...
Compare the date modified when loading session data.
2017-12-22 08:17:14 -08:00
Mike Jolley
e9105bd37d
Fix tests
2017-12-21 19:00:55 +00:00
Fulvio Notarstefano
e718d7bd40
[ #18223 ] Rename var to a more apt name
2017-12-19 17:19:10 +08:00
Fulvio Notarstefano
ee123fb739
[ #18223 ] Add argument to woocommerce_product_related_posts_query filter
2017-12-19 10:18:33 +08:00
Mike Jolley
6fd3d9c100
Compare the date modified when loading session data.
2017-12-18 16:43:18 +00:00
Mike Jolley
da0bda4a04
Add refunded payment prop after an API refund succeeds.
2017-12-15 16:23:26 +00:00
Rodrigo Primo
997a6fa40d
Make sure post_author is used only after WC 3.3.0 DB upgrade routine is executed
2017-12-08 15:55:53 -02:00
Rodrigo Primo
ad4304450d
Set post_author to 0 for refund orders
2017-12-08 12:32:45 -02:00
Rodrigo Primo
fee1dcf5f9
Merge branch 'master' into update/use-post-author-for-customer-id
2017-12-08 10:09:57 -02:00
Claudio Sanches
2f6f6112c2
Merge branch 'master' into feature/webhook-crud
2017-12-07 18:21:52 -02:00
Mike Jolley
c3623a9967
Update docblock for $include_taxes
...
Closes #18053
2017-12-07 11:46:35 +00:00
Claudio Sanches
0f4f8a3f16
Merge branch 'master' into feature/webhook-crud
2017-12-04 12:37:10 -02:00
Mike Jolley
0a9485c465
Merge branch 'master' into feature/11259
...
# Conflicts:
# assets/css/admin-rtl.css
# assets/css/admin.css
# includes/admin/list-tables/class-wc-admin-list-table-products.php
# includes/class-wc-install.php
# includes/wc-update-functions.php
2017-12-04 14:14:03 +00:00
Arif Widianto
c4a2ed88c3
Change to get_display_name from object
2017-12-02 07:30:39 +07:00
Claudiu Lodromanean
224fa43fe2
Merge pull request #17986 from woocommerce/fix/12439-pending-delivery
...
Fixed webhook initial test delivery ping
2017-12-01 10:31:46 -08:00
Claudiu Lodromanean
1a2a332f54
Merge pull request #17939 from woocommerce/feature/17734
...
Apply Webhooks CRUD into REST API
2017-12-01 10:07:21 -08:00
Claudio Sanches
f5cddc4f36
Fixed webhook initial test delivery ping
...
Part of #12439
2017-12-01 14:04:59 -02:00
Claudio Sanches
01b3f2bac4
Trigger webhook when delivery URL is changed
2017-11-30 16:48:16 -02:00
Claudio Sanches
575e2d2224
Advanced webhooks search
2017-11-28 17:39:42 -02:00
Claudio Sanches
c6f8e95b97
Merge branch 'master' into feature/webhook-crud
2017-11-28 15:09:10 -02:00
Rodrigo Primo
61c7abce4f
First pass at using post_author instead of the post meta '_customer_user'
2017-11-28 10:13:30 -02:00
Arif Widianto
793476e05f
Removed, display_name was not part of user meta
2017-11-28 08:36:09 +07:00
Claudio Sanches
8ed6e7436f
Merge pull request #17909 from woocommerce/update/phpcs-violations
...
Fix some PHPCS violations
2017-11-27 18:42:24 -02:00
Rodrigo Primo
e006e14d23
Ignore PHPCS in two instances
...
Ignoring PHPCS in two lines of the code where apparently it is not possible to fix the violations. I tried using what @claudiosanches suggested in this comment https://github.com/woocommerce/woocommerce/pull/17909#issuecomment-347168029 but both tags didn't work. Lets revisit this when PHPCS 3.2.0 is released and we can selectively disable rules (see https://github.com/squizlabs/PHP_CodeSniffer/issues/604 ).
2017-11-27 11:00:42 -02:00
Rodrigo Primo
3d6bd30d8a
Fix some PHPCS violations in includes/data-stores/abstract-wc-order-data-store-cpt.php
2017-11-24 17:25:31 -02:00
Rodrigo Primo
5e43d92e07
Fix some PHPCS violations in includes/data-stores/class-wc-order-data-store-cpt.php
2017-11-24 17:25:16 -02:00
Mike Jolley
c5a80d080b
Rename so delete is hidden
2017-11-23 14:41:17 +00:00
Mike Jolley
8dea28e6c2
Save default cat when saving products
2017-11-23 14:26:43 +00:00
Rodrigo Primo
e12fa54bc6
phpcbf automatic coding standard fixes
2017-11-23 12:16:47 -02:00
claudiulodro
a878b0cde5
Some phpcs
2017-11-22 14:03:26 -08:00
Arif Widianto
0b42515c93
Provides edit display name in my-account page ( #17606 )
2017-11-22 15:20:49 +07:00
claudiulodro
9ec24731bb
Generalize child_is_in_stock
2017-11-21 15:06:35 -08:00
claudiulodro
a73436bdcd
Merge remote-tracking branch 'origin/master' into HEAD
2017-11-20 14:43:12 -08:00
claudiulodro
cebe335dda
Update routine
2017-11-20 14:21:08 -08:00
claudiulodro
03d51e5471
Tweak variable on backorder logic
2017-11-20 11:32:30 -08:00
claudiulodro
b64b26d030
Variable products are on backorder if all children are backordered
2017-11-20 11:19:06 -08:00
Claudio Sanches
13978e496b
Merge branch 'master' into feature/webhook-crud
2017-11-20 10:34:35 -02:00
Mike Jolley
a23541ad5d
Fix 4.9 conflict with variation names
...
`santiize-title` works differently with `/` chars in 4.9. This update
routine keeps variations functioning by doing a DB update on read.
Fixes #17775
2017-11-18 14:53:18 +00:00
Claudiu Lodromanean
9c1d3b8108
Merge pull request #17726 from woocommerce/fix/17713
...
non-enabled children should not be ignored
2017-11-17 10:07:38 -08:00
claudiulodro
dddf0ee473
Variable product sync
2017-11-17 08:46:49 -08:00
Mike Jolley
a899b53b57
Unit test fix: Exclude syntax_highlighting
2017-11-16 18:58:09 +00:00
Claudio Sanches
9fe0c7261e
Merge branch 'master' into feature/webhook-crud
2017-11-16 12:20:22 -02:00
Mike Jolley
11d0293ddd
non-enabled children should not be ignored
...
This fixes #17713 by also returning private children (non-enabled).
2017-11-16 11:56:51 +00:00
Mike Jolley
7347b25ce0
Restore removed action
2017-11-13 19:07:02 +00:00
Mike Jolley
3e7968d37b
Merge branch 'master' into pr/16418
2017-11-13 14:37:18 +00:00
Claudio Sanches
6553a71586
Fixed how read empty dates while reading webhooks from database
2017-11-10 11:58:25 -02:00
Claudio Sanches
61efd99c61
Fixed WC_Webhook_Data_Store::get_webhooks_ids transient
2017-11-09 11:03:14 -02:00
Mike Jolley
7fa02bd4cb
Missing cache clear on delete
2017-11-08 12:21:03 +00:00
Claudio Sanches
bf6436e0c9
Cache search webhooks results and added method to count webhooks by status
2017-11-07 17:42:14 -02:00
Claudio Sanches
47ac2f140c
Search webhooks with data store
2017-11-07 16:10:38 -02:00
Claudio Sanches
7043245cb5
Merge branch 'master' into feature/webhook-crud
2017-11-07 12:42:28 -02:00
Mike Jolley
fa30b0bb07
Use wp_unslash
2017-11-06 15:48:11 +00:00
Herb Miller
4c9d411b08
Issue #17570 - stripslashes when setting customer data from the session
2017-11-06 15:47:31 +00:00
Mike Jolley
635ea09127
Merge branch 'master' into cache-variable-products-queries
2017-10-27 18:53:40 +01:00
Rodrigo Primo
a3f14c7256
Caches call to load product variation attributes
...
This commit adds product variation attributes to WP cache when they are first loaded to avoid running the same database queries when the same product is loaded multiple times. This cache will be invalidated whenever product attributes are changed.
Fixes #17120
2017-10-27 10:01:23 -02:00
Mike Jolley
08c4953b61
Clear counts cache when updating product attributes
...
Closes #17377
2017-10-26 20:16:52 +01:00
Rodrigo Primo
fb70ae3fea
Coding standards fixes
2017-10-25 17:53:17 -02:00
Claudiu Lodromanean
a396a6c83e
Merge pull request #17372 from woocommerce/fix/17369
...
Add cache invalidation for wc_get_product_terms
2017-10-25 10:30:44 -07:00
Mike Jolley
a467d35acd
Add cache invalidation for wc_get_product_terms
...
Closes #17369
2017-10-25 13:27:18 +01:00
claudiulodro
e6a9a5f79b
Fix date query meta unset checking
2017-10-24 13:07:21 -07:00
Mike Jolley
29e175901f
Added an update_prices_from_children routine and fixed sync_prices
2017-10-17 10:06:49 -07:00
Claudio Sanches
368d958be4
Merge branch 'master' into feature/webhook-crud
2017-10-10 16:13:37 -03:00
Claudio Sanches
c00fce3f94
Merge pull request #16490 from woocommerce/feature/16445
...
Webhooks CRUD and Data Store
2017-10-10 16:10:31 -03:00
claudiulodro
3723b95d7e
Make parse_date_for_wp_query public
2017-09-26 12:03:11 -07:00
Mike Jolley
9c327f09db
Sale logic only applies to simple products - fixes tests
2017-09-26 12:53:38 +01:00
Mike Jolley
4695d7a251
Handle sale dates on the fly in case of missed cron schedule.
...
Closes #16907
2017-09-25 14:19:20 +01:00
Joel Rowley
521bde2fba
Bugfix: coupon object cache not being cleared upon deletion
2017-09-09 22:47:25 -04:00
Boro Sitnikovski
5224eab917
Update PR with new logic
2017-09-05 19:56:56 +02:00
Boro Sitnikovski
85e3cee634
Use prop getters/setters instead
2017-09-05 15:17:16 +02:00
Mike Jolley
2da895c68d
Update price if product type changes
...
Fixes #16650
2017-08-30 16:23:57 +01:00
Mike Jolley
c29b9acb5b
Fix variable name
...
Closes #16636
2017-08-29 11:19:03 +01:00
Claudio Sanches
c03520a661
Allow pre query filter return an empty array
2017-08-28 16:23:12 -03:00
Claudio Sanches
d5aae55725
Prevent "Argument #N is not an array" warning when WP_User_Query returns null
2017-08-28 16:15:19 -03:00
Claudio Sanches
f8c18ba899
Introduced pre query filter to WC_Customer_Data_Store::search_customers()
2017-08-28 16:14:13 -03:00
Josh Smith
49c7449e8b
Merge remote-tracking branch 'upstream/master'
2017-08-23 22:41:04 +00:00
Mike Jolley
804feb9333
Store fee amount and prevent totals going negative
2017-08-23 12:15:06 +01:00
Josh Smith
39544cb27b
[ #12517 ] Remove calls to action woocommerce_process_product_file_download_paths since download ids should no longer change. They are now static UUIDs.
2017-08-23 03:22:33 +00:00
Josh Smith
df64c48103
[ #12517 ] In deprecated function call for update_download_id, use __METHOD__ instead of hard coded function name
2017-08-23 03:21:35 +00:00
Josh Smith
ee13db49a2
[ #12517 ] Move download log table to const and helper, output download log report titles in standalone function, reorganize download log data store read for code readability
2017-08-23 03:10:14 +00:00
Josh Smith
868a0e0e84
Merge remote-tracking branch 'upstream/master'
2017-08-23 02:33:01 +00:00
Claudio Sanches
03a189726e
Introduces woocommerce_get_product_id_by_sku filter
...
Closes #16559
2017-08-22 15:04:21 -03:00
Mike Jolley
fb2d8cb394
Prevent regular price being lower than the sale price
...
Closes #16560
2017-08-22 11:43:48 +01:00
Josh Smith
413444c616
Merge remote-tracking branch 'upstream/master'
2017-08-20 04:09:17 +00:00
Claudio Sanches
95de32d9c7
Changed webhook table name for #16390
2017-08-18 13:41:02 -03:00
Jeremy Pry
2d4b7356df
Update some docblocks with proper parameters
2017-08-18 12:18:19 -04:00
Mike Jolley
e99471c0cd
Removed manual discounts code
2017-08-18 10:36:10 +01:00
Claudio Sanches
2a3d37cc89
Webhooks does not have meta data
2017-08-17 19:42:54 -03:00
Claudio Sanches
2d19d47357
Fixed spacing
2017-08-17 19:04:36 -03:00
Claudio Sanches
3266fd48fe
Fixed how to auto set dates
2017-08-17 18:43:08 -03:00
Claudio Sanches
1829c81689
Fixed coding standards
2017-08-17 11:14:41 -03:00
Claudio Sanches
9fac34fbcb
Save webhook results on wp cache
2017-08-17 11:07:30 -03:00
Claudio Sanches
dcf3e27155
New helpers to load webhooks
2017-08-17 10:51:20 -03:00
Claudio Sanches
00185c5911
Webhook data store
2017-08-17 00:08:32 -03:00
claudiulodro
ae80d12d80
Merge master
2017-08-14 11:12:09 -07:00
Mike Jolley
1545e46fd5
cache clearing
2017-08-11 16:17:13 +01:00
Mike Jolley
5587ff6874
Variation data store should remove product_type term on save
...
Closes #16409
2017-08-11 12:32:12 +01:00
Mike Jolley
e90fb6d54f
fix discount apply and save
2017-08-10 15:33:01 +01:00
Mike Jolley
cd8fb23884
Add ability to get local item rather than from DB
2017-08-10 14:38:02 +01:00
Mike Jolley
f71dc64d35
Manual discounts and negative taxes
2017-08-09 18:53:10 +01:00
Mike Jolley
f480c98d11
Data stores
2017-08-09 16:17:02 +01:00
Josh Smith
d8b6b2042a
Merge remote-tracking branch 'upstream/master'
2017-08-08 21:20:35 +00:00
Boro Sitnikovski
9022261f13
Fix cache issue.
...
From discussion with @mikejolley:
The class is not doing its job of invaliding cache after adding a line item.
At any point (action hook), a 3pd can call `get_items` and it will cache the items for that particular order so any subsequent calls to it will return bad data.
Unless you ADD items, `get_items` will return good data.
So adding items in this case is not invalidating, so that's the bug.
Relates to: https://github.com/woocommerce/woocommerce-bookings/issues/1310
2017-08-07 15:29:17 +02:00
Josh Smith
644ac674d7
[ #12517 ] Replace download_id on customer download and product download with static UUID instead of filename based hash, to preserve download links, logs, and permissions across filename changes
2017-08-05 04:42:31 +00:00
Josh Smith
dfeead42a5
[ #12517 ] Add download log report to WC admin reports, with link from Order details Downloads section
2017-08-03 21:24:53 +00:00
claudiulodro
91f1d41842
Clarify logic
2017-08-01 13:21:23 -07:00