woocommerce/tests/unit-tests/customer
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
..
class-wc-tests-customer-download.php Improve WC_Customer_Download_Data_Store::get_downloads() performance 2018-01-22 17:25:26 -02:00
crud.php Fix tests 2017-12-21 19:00:55 +00:00
customer-download-log.php Feedback 2017-11-13 15:58:22 +00:00
customer.php WIP - Product CRUD (#12065) 2016-11-16 12:38:24 +00:00
functions.php Add unit test to cover download permissions when running wc_update_new_customer_past_orders 2017-11-20 10:12:59 +02:00