Commit Graph

71 Commits

Author SHA1 Message Date
vedanshujain 6ed8ffe850 Addressed PR review comments #27734 2020-11-10 14:23:45 +05:30
vedanshujain bb1e2f44ae Removed/reverted more unnecessary changes. 2020-11-10 14:23:43 +05:30
vedanshujain 44a226941d Refactor `read_meta` into filter_raw_data for better re-usability. 2020-11-10 14:23:41 +05:30
Néstor Soriano 09e066fc6e
Update includes/data-stores/class-wc-data-store-wp.php
Update `@since` in new function to 4.8.0
2020-11-04 13:09:52 +01:00
James Allan 82b68b4914 Use strict comparison to compare post dates
With PHP 8.0, non-strict comparisons between integers and strings containing
non-numeric characters are being tightened. This affects comparisons like:

0 < '0000-00-00 00:00:00'

PHP 8.0 that equates to true whereas prior to 8.0 it would be false.

More details of this change can be found at: https://wiki.php.net/rfc/string_to_number_comparison
2020-11-02 11:10:30 +10:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Claudio Sanches 58db7314a8 Added validation for product fields. 2020-04-07 11:29:54 +02:00
Claudio Sanches 3ce6acec74 Updated outdated codex URLs 2019-06-12 19:31:01 -03:00
Peter Fabian 68a325249f Removed the extra parameter that didn't make sense.
Also get_data_for_lookup_table should not be checking db value of  _manage_stock as that can be in the process of being changed.
2019-05-15 14:20:27 +02:00
Peter Fabian 44f1803c53 Tweaked update lookup table to add the possibility to ignore manage_stock value from the database.
E.g. if manage_stock property has been changed in the object/local copy of the product while updating it, but the product has not been saved to the db yet, the lookup table update would ignore stock quantity update.
2019-05-02 19:29:28 +02:00
Mike Jolley e55bb84e8b
Merge pull request #22718 from woocommerce/experiment/product-sorting-index
Performance: product sorting lookup table
2019-03-11 13:27:10 +00:00
Mike Jolley 663f724bdd Cleanup methods 2019-03-07 15:08:22 +00:00
Mike Jolley 5749369ba5 Update coupons and orders to use update_or_delete_post_meta 2019-02-19 15:35:05 +00:00
Mike Jolley ea22b1cf47 Wrong var name 2019-02-19 13:24:29 +00:00
Mike Jolley 8c82333034 update_or_delete_post_meta method which does what it says 2019-02-19 13:23:09 +00:00
Mike Jolley 7b6558e1df Correct table names and updater 2019-02-12 14:04:22 +00:00
Mike Jolley eae9f73bd2 update_lookup_table helper 2019-02-12 13:22:51 +00: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
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
Boro Sitnikovski d6b4ca980c Add support for arrays when building meta query args 2018-04-26 16:49:49 +02:00
Mike Jolley 906aa97aea Merge branch 'master' into update/19061 2018-03-12 19:28:53 +00: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 2b5103c849 Fix phpcs violations using phpcbf 2018-03-08 14:30:43 -03:00
Mike Jolley c0c4348123 Use wp_search_stopwords filter 2018-02-27 19:22:15 +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
claudiulodro 3723b95d7e Make parse_date_for_wp_query public 2017-09-26 12:03:11 -07:00
Mike Jolley f47bb39a06 Merge pull request #15479 from woocommerce/add/poc-no-managing-meta-directly
Proof of concept to error when internal meta props are accessed directly
2017-07-27 15:54:24 +01:00
Jaydeep Rami 46d3638089 Fix missing return statement (#16148)
* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement

* Fix missing return statement
2017-07-20 18:01:14 +01:00
Mike Jolley a2a34cf0be Added `woocommerce_data_store_wp_{$this->meta_type}_read_meta` filter
#16136
2017-07-17 10:34:44 +01: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
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
Mike Jolley 3bfd2bab48 Prevent extra slashes on meta values
by_mid functions do not expect slashes

Fixes #15868
2017-06-29 22:41:11 +01:00
Mike Jolley d568069c37 Add slashes to meta value in data store before passing to WP functions
Fixes #15808
2017-06-27 15:11:32 +01:00
claudiulodro f1a9dbc69e Extra checks and tests 2017-06-13 13:32:21 -07:00
Boro Sitnikovski 0271a9e2fe Update version 2017-06-07 16:20:09 +02:00
Boro Sitnikovski efd42e6bc4 Proof of concept to error when internal meta props are accessed directly 2017-06-06 19:13:53 +02:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
claudiulodro fe40e9b96a Make date queries work properly 2017-05-12 15:25:15 -07:00
claudiulodro e31cbfd5c4 Formatting for readibility 2017-05-10 14:33:29 -07:00
claudiulodro d461ea86d6 Use local timezone for yyyy-mm-dd queries 2017-05-10 13:08:47 -07:00
claudiulodro db1d5ac987 Simplify logic 2017-05-10 12:02:15 -07:00
claudiulodro a0727fb8a1 Change to date array 2017-05-10 11:49:11 -07:00
claudiulodro 5d86b2f001 Formatting 2017-05-09 14:55:39 -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
claudiulodro 7c393a4469 Better time handling 2017-04-28 14:01:06 -07:00