Commit Graph

11628 Commits

Author SHA1 Message Date
Mike Jolley 139c652e1d Ensure we have child before getting price
Fixes #15322
2017-05-29 10:43:56 +01:00
Mike Jolley 4ec3fe61f9 Merge pull request #15290 from peterrath/New-action-for-display-custom-data-in-order-fee-lines
New action for display custom data in order fee lines
2017-05-29 10:17:35 +01:00
Mike Jolley 934e95bc8b Merge pull request #15308 from woocommerce/fix/15297
Grouped product support in importer/exporter
2017-05-29 10:13:45 +01:00
Mike Jolley 4251d71dab Hide replies from recent reviews widgets
Fixes #15307
2017-05-29 10:09:17 +01:00
Mike Jolley f1d718d38a Format parent stock qty on read
Fixes #14759
2017-05-29 10:03:35 +01:00
claudiulodro 759fcae533 Use 'grouped_products' for grouped products 2017-05-28 12:37:18 -07:00
Peter 314f64b566 Change the name of the new action
Change the name of the new action to woocommerce_after_order_fee_item_name.
2017-05-28 20:40:59 +02:00
Claudio Sanches 6d54ae3504 Fetch product ID for temporary products only while processing the item 2017-05-26 19:57:31 -03:00
Claudio Sanches 3d5891e589 Fixed how backorders field is parsed 2017-05-26 19:39:20 -03:00
Claudio Sanches 77fcaf3392 Fixed images map handler 2017-05-26 19:30:42 -03:00
Claudio Sanches 0719746af2 Validate dates and use string format to use website timezone 2017-05-26 19:25:44 -03:00
Claudio Sanches 4bc139fef9 Fixed conflicts 2017-05-26 19:09:57 -03:00
Claudio Sanches 4d66bc9e45 Merge branch 'feature/product-csv-import-export' into refactor/fix-importer-and-improve-unit-tests 2017-05-26 19:07:46 -03:00
Claudio Sanches fe67ca0aff Fixed images mapping key 2017-05-26 18:58:35 -03:00
Claudio Sanches 2eeb444eeb Properly set stock quantity 2017-05-26 18:53:22 -03:00
Claudio Sanches 02a27ae258 Fixed PHP Notice about undefined name for product attributes 2017-05-26 18:44:22 -03:00
Claudio Sanches 780ce1a4e6 Fixed deprecated `set_stock` notice 2017-05-26 18:42:07 -03:00
Claudio Sanches d2c3bf362f Normalize column names 2017-05-26 18:01:15 -03:00
claudiulodro 9b925d28ec Grouped product child support 2017-05-26 13:30:17 -07:00
claudiulodro c96f8b5bc1 Better unset 2017-05-26 12:16:38 -07:00
claudiulodro 4a104f3202 Remove extra isset 2017-05-26 11:41:44 -07:00
claudiulodro 00d37412eb Accidentally reverted a fix 2017-05-26 11:37:12 -07:00
claudiulodro d362d47995 Get external products working 2017-05-26 11:26:55 -07:00
Ninos Ego 8eec5cc802 Small fix for thousand separators replacement check 2017-05-26 20:06:24 +02:00
Ninos Ego ccdac49723 Fix for #15294 2017-05-26 19:31:13 +02:00
Mike Jolley dcdd44ae67 Use correct keys for images 2017-05-26 18:09:49 +01:00
Mike Jolley dbd0f3dce0 error message 2017-05-26 16:56:37 +01:00
Mike Jolley d9217b1d59 More tidyup 2017-05-26 16:54:43 +01:00
Mike Jolley f51d434d10 Added todo item in exporter 2017-05-26 15:57:29 +01:00
Mike Jolley 3a7f4884d8 Moved logic around and organised 2017-05-26 15:57:17 +01:00
Claudio Sanches 995aa89b84 Fixed shipping class parser 2017-05-26 12:27:06 +01:00
Mike Jolley 62bcca6cce Merge pull request #15277 from woocommerce/fix/float-number-comparison
Support floats for the custom sort function
2017-05-26 11:16:22 +01:00
Mike Jolley c92d6335ff Merge pull request #15282 from woocommerce/fix/15267
Use meta id instead of key in WC_Order_Item::offsetGet
2017-05-26 11:11:01 +01:00
Peter 05516dbea5 New action for display order fee custom data
We need to display custom data in fee lines, similarly to woocommerce_after_order_itemmeta action in shipping line items.
2017-05-26 10:05:26 +02:00
Jonathan Moore 7dc2c7cd6e fixes #15283
fixes #15283 Notice: Undefined property: stdClass::$post_ID in wp-content/plugins/woocommerce/includes/class-wc-structured-data.php on line 262 
when calling wp_list_comments with $options['callback'] = 'woocommerce_comments'
2017-05-26 07:59:42 +08:00
claudiulodro e00d7b7c55 File metadata by id 2017-05-25 14:43:36 -07:00
Konstantin Kovshenin dda05889eb Helper: Avoid an undefined warning in the main template 2017-05-25 23:44:29 +03:00
claudiulodro fc05af3514 Phpcs fixes 2017-05-25 12:53:32 -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 c4c990bc7c Remove unneccessary function 2017-05-25 12:36:10 -07:00
claudiulodro a99d7ff099 Exporter tests and tweaks 2017-05-25 12:33:14 -07:00
Claudio Sanches ac4bcf39c2 Merge pull request #15268 from woocommerce/fix/14775
For COD orders, force payment complete status to be completed.
2017-05-25 15:12:34 -03:00
Mike Jolley ba305eacb5 Fix tests 2017-05-25 18:16:10 +01:00
Boro Sitnikovski be70a3f95c Support floats for the custom sort function 2017-05-25 18:05:13 +02:00
claudiulodro 6d098b9c21 Clean up and some tests 2017-05-25 08:41:11 -07:00
Mike Jolley c31ab30391 Create temp objects to update later 2017-05-25 14:54:49 +01:00
Mike Jolley 42c3c9e593 Remove extra full stop 2017-05-25 12:36:12 +01:00
Mike Jolley 2e5053633b CRUD should update post type on update so it matches expected value. 2017-05-25 12:09:59 +01: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
Mike Jolley 0e675137e3 Merge branch 'fix/issue-15252' 2017-05-25 11:30:09 +01:00
Mike Jolley d73849eee3 wc_strtoupper helper 2017-05-25 11:30:01 +01:00
Anwer AR c4fcddca73 Back to attributes link on attributes edit page (#15088)
* see #15059 The issue was about editing product attributes. Added back to attributes link.

* Updates admin_url to esc_url

* Added admin_url again wrapping inside esc_url

The function works without admin_url in my previous commit. but i have added admin_url again to make sure it points to correct location.

* Correctted typo of esc function and removed icon

correction of spell mistake and removal of &larr due to translation and RTL concerns. though WP and WC itself using &larr on some places.
2017-05-25 11:15:57 +01:00
Dixita Dusara fe4a4a7e83 Update issue Undefined index warning when saving variations with stock management disabled #15242 (#15271)
* Issue Undefined index warning when saving variations with stock management disabled #15242

* updated issue as per your suggestion for index warning when saving variations with stock management disabled #15242
2017-05-25 10:58:32 +01:00
Claudio Sanches a58bd42dcf Merge pull request #15172 from woocommerce/fix/15166
Correct price query when on a post type archive
2017-05-24 21:13:30 -03:00
Cesar Rodas 563aa887f7 Apply woocommerce_order_get_items filter to get_item 2017-05-24 17:30:14 -04:00
Claudio Sanches 72b98cbf5d Fixed WC_Customer->set_display_name @since #15239 2017-05-24 17:45:20 -03:00
Claudiu Lodromanean be25e49069 Merge pull request #15266 from woocommerce/fix/15238
Fix saving of text attributes with special chars
2017-05-24 11:38:28 -07:00
Boro Sitnikovski e68977d021 function_exists check 2017-05-24 20:22:58 +02:00
Mike Jolley bf48ac9e96 Merge pull request #15239 from woocommerce/fix/15020-display-name-update
Check for an existing display name before updating a user on checkout
2017-05-24 19:20:45 +01:00
Boro Sitnikovski c7c4cfbae5 Use mb 2017-05-24 20:19:17 +02:00
Claudiu Lodromanean 0a57283b61 Merge pull request #15264 from woocommerce/fix/15240
Gallery should be updated even if empty.
2017-05-24 11:18:53 -07:00
Kelly Dwan ea98da7778 Use display_name from the customer data store 2017-05-24 14:14:29 -04:00
Mike Jolley 28d355948f docblock 2017-05-24 19:11:16 +01:00
Boro Sitnikovski 43955736fc Update PR after review 2017-05-24 20:10:51 +02:00
Kelly Dwan 0a265b53a2 Add display_name to customer data store 2017-05-24 13:57:11 -04:00
Mike Jolley 20637e53b8 For COD orders, force payment complete status to be completed. 2017-05-24 18:48:34 +01:00
Kelly Dwan 51f4a6b1b8 Customers: Don’t update the display name of a user when completing an order, unless the old display name is an email. 2017-05-24 13:32:02 -04:00
Mike Jolley 7f8add52a7 Fix saving of text attributes with special chars
Fixes #15238
2017-05-24 18:01:19 +01:00
Mike Jolley 4b74f304b0 Gallery should be updated even if empty.
Fixes #15240
2017-05-24 17:23:28 +01:00
Konstantin Kovshenin 8b5c5c0bd6 Helper: Add better update URLs to theme subscriptions 2017-05-24 18:15:07 +03:00
Konstantin Kovshenin f912f39364 Helper: Add better update URLs to plugin subscriptions 2017-05-24 18:11:37 +03:00
Konstantin Kovshenin 353eac70ca Helper: Remove some legacy updater notices 2017-05-24 18:10:31 +03:00
roykho c837827992
Fix undefined global variable notice 2017-05-24 07:21:20 -07:00
Claudio Sanches 5f28c733cc Merge pull request #15234 from woocommerce/update/14630
Update serializejson to 2.8.1
2017-05-24 09:21:10 -03:00
Boro Sitnikovski 30f20b81de Make state validation less stricter for keys 2017-05-24 14:09:09 +02:00
Konstantin Kovshenin e8afe57593 Helper: Add contextual nags about available extension updates 2017-05-24 14:59:48 +03:00
Claudio Sanches da7d5786d3 Merge branch 'feature/product-csv-import-export' into feature/product-parser-match-exporter 2017-05-24 08:56:27 -03:00
Claudio Sanches b08c75fb83 Added handler for default attributes and improved how deal with product attributes 2017-05-24 08:14:10 -03: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 66d7aabe6c Added full support for variations in importer 2017-05-24 07:26:57 -03:00
Konstantin Kovshenin a1b3d2834b Helper: Fix duplicate product output 2017-05-24 13:04:52 +03:00
Claudio Sanches 86036d7040 Check for WP_Error while getting/creating tags and shipping classes 2017-05-24 06:47:12 -03:00
Claudio Sanches 83f08ec18d Set attribute as visible by default 2017-05-24 05:43:15 -03:00
Claudio Sanches 60dd750a7b Handle product attributes 2017-05-24 04:32:28 -03:00
Claudio Sanches cd4a9ccf6a Fixed mapping sample display of 0 and false 2017-05-24 03:57:36 -03:00
Claudio Sanches c08d3a356e Added support "Attribute %d Visible" 2017-05-24 03:42:38 -03:00
Claudio Sanches 2c5c0133f3 meta_data is always an array 2017-05-24 03:35:53 -03:00
Claudio Sanches b10f3a3be9 Fixed coding standards 2017-05-24 03:26:17 -03:00
Claudio Sanches babc38822a Handle featured image and gallery 2017-05-24 03:14:54 -03:00
claudiulodro 201ea727db Simplify status check 2017-05-23 18:52:03 -07:00
claudiulodro 4faad7d964 Finish unit tests and bugfixes 2017-05-23 18:44:37 -07:00
Claudio Sanches a07dc188d0 Parse and save downloads 2017-05-23 22:31:06 -03:00
Claudio Sanches f676fa2752 Update products and variations parser 2017-05-23 21:58:10 -03:00
Claudio Sanches 43a26ea851 Properly map items when CSV match WooCommerce exporter format 2017-05-23 21:38:27 -03:00
Cesar Rodas ea9c573f2c Improved WC_Order::get_item()
Do not load all items, just load the items with a given order_item_type.
2017-05-23 20:12:47 -04:00
Claudio Sanches 2ebea10be6 Fixed tags and shipping class parsers warnings
wp_insert_term() returns array with `term_id` and `term_taxonomy_id` only.
2017-05-23 21:11:21 -03:00
Claudio Sanches d20c61678c Parser categories 2017-05-23 21:06:16 -03:00
Cesar Rodas b612bab38b Fixed coding styles 2017-05-23 19:18:31 -04:00
Mike Jolley 383a318f59 Merge pull request #14949 from aelia-co/Improvement-customer-total-spent-filter
New filters for customer total spent
2017-05-23 20:37:58 +01:00
Diego Zanella 89efc65327 Fixed call to woocommerce_customer_get_total_spent_query filter
* Variable `$customer` was passed to `$wpdb->get_var()` instead of the filter.
2017-05-23 20:35:21 +01:00
Mike Jolley c5d7dfba6c Feedback 2017-05-23 19:46:46 +01:00
Mike Jolley f6df18542a Merge pull request #15113 from bekarice/fix/wc_create_refund-date
Fix: Re-add date for wc_create_refund()
2017-05-23 19:33:23 +01:00
Mike Jolley a3b89a9efc Merge pull request #15144 from timondavis/fix/15103-cannot_set_default_variation_to_string_zero
#15103 Variation default value of '0' fails to save on product.
2017-05-23 19:31:38 +01:00
Mike Jolley 8a22d41605 Merge remote-tracking branch 'origin/master' 2017-05-23 19:29:44 +01:00
Mike Jolley 41e8b22b5a Merge branch 'pr/15219' 2017-05-23 19:28:45 +01:00
Mike Jolley 002dd935b5 Check we have a product object 2017-05-23 19:28:35 +01:00
Mike Jolley 35536b8ace Merge pull request #14576 from Chouby/tools_message
Add custom message for custom system status tools
2017-05-23 19:22:47 +01:00
Mike Jolley 6dfdc86111 Merge branch 'pr/14678' 2017-05-23 19:16:37 +01:00
Mike Jolley 109e951de3 Renamed filters and actions 2017-05-23 19:16:30 +01:00
Mike Jolley c16acc6b51 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	assets/css/wc-setup-rtl.css
#	assets/css/wc-setup.css
2017-05-23 19:00:24 +01:00
Mike Jolley d3666738d8 Merge branch 'pr/15069' 2017-05-23 18:56:58 +01:00
Mike Jolley 00e5189a05 Merge pull request #15070 from rasmusbe/phpdoc-missing-return-throws
Phpdoc: Add missing return and throws
2017-05-23 18:50:58 +01:00
Mike Jolley 4efc8d1247 Merge remote-tracking branch 'origin/master' 2017-05-23 18:48:31 +01:00
Mike Jolley 3b1894dd8f Merge branch 'pr/15039' 2017-05-23 18:48:24 +01:00
Mike Jolley c709b7f490 since 2017-05-23 18:48:16 +01:00
Mike Jolley c6d63e7819 Merge pull request #15017 from Ninos/filter/cookie
Filter for cookie name
2017-05-23 18:38:42 +01:00
Mike Jolley f594f11273 Merge pull request #14293 from woocommerce/fix/14162-query
Set and restore wp_query so product page functions think it's a real product page
2017-05-23 18:29:24 +01:00
Mike Jolley c4837f4419 Merge pull request #14653 from woocommerce/fix/14150
Update price sorting code
2017-05-23 18:13:27 +01:00
Diego Zanella a6bcc73846 Added $customer to filter woocommerce_customer_get_total_spent_query 2017-05-23 17:06:16 +01:00
Diego Zanella 885cb14029 Merge branch 'master' into Improvement-customer-total-spent-filter 2017-05-23 17:05:08 +01:00
Mike Jolley 8f27df6af3 Merge pull request #14294 from woocommerce/fix/14292
When searching, disable WC sort order
2017-05-23 16:43:24 +01:00
Mike Jolley 15f47e00a2 Merge branch 'master' into feature/13088
# Conflicts:
#	assets/css/admin-rtl.css
#	assets/css/admin.css
#	assets/css/twenty-seventeen-rtl.css
#	assets/css/twenty-seventeen.css
#	assets/css/woocommerce-rtl.css
#	assets/css/woocommerce.css
2017-05-23 16:35:17 +01:00
Mike Jolley db012b3a12 Merge pull request #15011 from woocommerce/fix/14999
Add abspath checks
2017-05-23 15:57:35 +01:00
Mike Jolley d31a58b117 More abspath 2017-05-23 15:40:19 +01:00
Mike Jolley 2d479e0580 Update serializejson to 2.8.1
Closes #14630
2017-05-23 15:27:53 +01:00
Mike Jolley 7901653f94 Merge pull request #15003 from woocommerce/fix/15001
Use VAT for norway
2017-05-23 15:07:39 +01:00
Mike Jolley 90213efa46 Merge pull request #15227 from woocommerce/fix/15225
A single multi-word attribute is fine for variation titles
2017-05-23 15:06:55 +01:00
Mike Jolley b1a5b23629 Done screen handling and form tweaks 2017-05-23 15:05:32 +01:00
Mike Jolley 2383799409 A single multi-word attribute is fine for variation titles
Closes #15225
2017-05-23 10:52:44 +01:00
Mike Jolley f09f7eb84e Merge pull request #15150 from woocommerce/fix/15118
Add handles so drag and drop does not break edit on mobile
2017-05-23 10:20:08 +01:00
dixitadusara ebe831ccec Issue Missing $ip Variable #15213 2017-05-23 11:50:30 +05:30
Claudio Sanches ac304473c7 Allow external URL and button text for external products 2017-05-22 20:18:39 -03:00
Claudio Sanches 8d5f706077 Save meta_data 2017-05-22 19:31:05 -03:00
Claudio Sanches 7f92479f4f Create shipping class or tag if does not exist 2017-05-22 19:24:33 -03:00
Claudio Sanches 775a934b74 Parse shipping class ID and tags IDs 2017-05-22 18:54:30 -03:00
James Kemp 90c987af70 Utilise $product method to get thumbnail
Is there any reason this function isn't using the `get_image()` method? It seems if we're accessing the `$post->ID`, then we should have access to the `$product` object too?

The reason being, the `get_image()` method also checks for the parent featured image, so is more robust. It may also be worth considering a filter in the `get_image()` method.
2017-05-22 22:07:51 +01:00
Claudiu Lodromanean 4bbc50d52c Merge pull request #15182 from woocommerce/fix/14861
Group by term ID to prevent duplicates
2017-05-22 13:14:47 -07:00
Claudiu Lodromanean 58189cb4b5 Merge pull request #15208 from woocommerce/fix/15203
Missing variable in legacy API
2017-05-22 13:10:28 -07:00
Claudiu Lodromanean d530587cd3 Merge pull request #15170 from woocommerce/fix/15163
Cancelled email should be send for processing orders, not pending.
2017-05-22 12:00:25 -07:00
Claudiu Lodromanean 2a19598930 Merge pull request #15214 from woocommerce/fix/15191
Update jquery payment to v3
2017-05-22 11:13:22 -07:00
Claudiu Lodromanean 700460d925 Merge pull request #15211 from woocommerce/fix/15002
Zones API changes for zone 0
2017-05-22 11:12:59 -07:00
Mike Jolley 2a51aa2020 Update jquery payment to v3 2017-05-22 16:37:08 +01:00
Mike Jolley b1bf3278a7 Prevent zone 0 having locations set in CRUD 2017-05-22 15:19:15 +01:00
Mike Jolley 8cba7db7cd Prevent zone 0 name being changed 2017-05-22 15:19:04 +01:00
Mike Jolley a826b363d8 Prevent zone 0 locations being changed 2017-05-22 15:18:55 +01:00
Mike Jolley d1b49888f2 Missing variable in legacy API
Fixes #15203
2017-05-22 13:25:33 +01:00
Mike Jolley fc8100877c Undo change 2017-05-22 12:19:54 +01:00
Claudio Sanches 4f16740f61 Parse special column names and internal fields 2017-05-19 18:50:09 -03:00
Claudio Sanches 8a7e215b41 Return raw_keys if mapped_keys is empty 2017-05-19 18:46:42 -03:00
Claudio Sanches e66a657a2e Removed "CSV" from filters and IDs 2017-05-19 18:45:58 -03:00
claudiulodro 57c4d904bd Type 2017-05-19 12:43:40 -07:00
claudiulodro cb297ad1b0 Add skip existing option 2017-05-19 10:58:31 -07:00
Mike Jolley eae2fb64c8 Group by term ID to prevent duplicates
Fixes #14861
2017-05-19 15:27:57 +01:00
Mike Jolley 636754096d Handle type parsing correctly 2017-05-19 15:06:45 +01:00
Mike Jolley 754e991220 Redirect if there is no mapping data 2017-05-19 15:06:36 +01:00
Mike Jolley e860a8d307 Abort if we have no mapping data 2017-05-19 14:59:05 +01:00
Mike Jolley aeb3234ec6 Formatting 2017-05-19 14:33:40 +01:00
Mike Jolley cde32be82d Done step and styling 2017-05-19 13:25:03 +01:00
Mike Jolley 1617c62f47 Export text tweaks 2017-05-19 12:03:34 +01:00
Mike Jolley 2082d84e4d Always sync incorrect titles on variation read regardless of version
For #15158
2017-05-19 11:28:13 +01:00
Mike Jolley 47d7fedff8 Correct price query when on a post type archive
Fixes #15166
2017-05-19 11:19:30 +01:00
Mike Jolley 067489b155 Cancelled email should be send for processing orders, not pending.
Fixes #15163
2017-05-19 10:45:26 +01:00
Claudio Sanches 33da6e16de Start handle parsed data 2017-05-18 21:19:01 -03:00
Claudio Sanches 2ba8e27469 Included required methods to the interface 2017-05-18 21:18:56 -03:00
Claudio Sanches ca083c6197 Skip reletive field if empty 2017-05-18 21:18:53 -03:00
Claudio Sanches 4c9d7ef02e Handle relative fields 2017-05-18 21:18:50 -03:00
Claudio Sanches 74b4ba8a94 Improved sanitization in product CSV importer and handle special columns 2017-05-18 21:18:47 -03:00
Claudiu Lodromanean a13668f201 Merge branch 'feature/product-csv-import-export' into feature/background-processing 2017-05-18 10:11:34 -07:00
claudiulodro 9d52ef9f61 Performance tweak 2017-05-18 10:05:31 -07:00
claudiulodro 83908bc735 Move file functions to abstract class 2017-05-18 09:59:40 -07:00
claudiulodro b2e8d31262 Clean up 2017-05-18 09:49:58 -07:00
Mike Jolley 9f4b29a677 Merge pull request #15153 from woocommerce/tweak/15104
Check if subtotal is blank, not empty
2017-05-18 16:50:26 +01:00
Claudiu Lodromanean 0132a29c18 Merge pull request #15152 from woocommerce/fix/15127
Handle shipping item taxes if set to avoid the legacy fallback
2017-05-18 08:28:02 -07:00
Claudiu Lodromanean b5b76a428f Merge pull request #15151 from woocommerce/fix/15145
Fix stock/backorder notice when stock management is disabled
2017-05-18 08:24:04 -07:00
Mike Jolley 8dbf41994b Check if subtotal is blank, not empty
Closes #15104
2017-05-18 15:59:07 +01:00
Mike Jolley 56a3b31e68 Handle shipping item taxes if set to avoid the legacy fallback
Fixes #15127
2017-05-18 15:48:42 +01:00
Mike Jolley 89ece25a32 Fix stock/backorder notice when stock management is disabled
Fixes #15145
2017-05-18 15:28:38 +01:00
Mike Jolley c3c966b5fd Add handles so drag and drop does not break edit on mobile
Fixes #15118
2017-05-18 15:22:12 +01:00
Mike Jolley eb147197a2 Variations should inherit purchase_note from parent.
Fixes #15115
2017-05-18 14:47:00 +01:00
Mike Jolley cac5b33553 Merge pull request #14639 from atimmer/stories/webhook-public-build_payload
Change build_payload from private to public
2017-05-18 13:15:53 +01:00
Mike Jolley ebfe8fec65 Merge pull request #14953 from pixedelic/master
added filters on zoom / flexslider / photoswipe enabling
2017-05-18 13:14:14 +01: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
Boro Sitnikovski d302e18a9b Rename `informational` to `info` in the phpdoc 2017-05-18 10:32:25 +02:00
Claudio Sanches 36fa838678 Allow extend auto mapping options 2017-05-17 21:10:26 -03:00
Claudio Sanches df63ea9b5a Handle special column names
Handle columns names like "Attribute 1 Name" and "Meta: _foo_bar".
2017-05-17 20:59:36 -03:00
claudiulodro 2ab0fdfe78 Styling 2017-05-17 14:55:20 -07:00
claudiulodro fa1446bc86 Clean up 2017-05-17 14:43:03 -07:00
claudiulodro 17083dafae Initial background importer implementation 2017-05-17 14:34:49 -07:00
Claudio Sanches d3ec48f378 Match regular fields between exporter and importer 2017-05-17 17:55:28 -03:00
Claudio Sanches ce6741e117 Fixed error display and incorrect use of WP_Error 2017-05-17 14:57:03 -03:00
Claudio Sanches 215a9fa0c1 Fixed warning about empty callback name 2017-05-17 14:43:48 -03:00
Mike Jolley e23acb3719 Fix shop page when using shop base and UTF8 shop page slug
To test, set shop page slug and name to `חנות` then set permalinks to
shop base.

Repeat that before and after patch.

Shop page 404 errors before patch.

Fixes #15111
2017-05-17 18:13:32 +01:00
Mike Jolley 956b1a6181 Adds storefront/theme step to the setup wizard
Also includes a background install to get Storefront installed and
activated on demand.

To test, use a default theme and go to wp-admin/index.php?page=wc-setup
The theme step will be after payments!
2017-05-17 17:42:18 +01:00
claudiulodro adc8f4eacb Use correct method name 2017-05-17 09:15:49 -07:00
claudiulodro d6ef3ca855 Docblock tweak and remove unused query var 2017-05-17 08:51:45 -07:00
Mike Jolley a6537ff269 export styling 2017-05-17 14:22:41 +01:00
Mike Jolley d67fb8fb83 New style import controller
Closes #15107
2017-05-17 14:16:38 +01:00
Mike Jolley bf2979f68d Revert change - export directory contains logic only, not admin 2017-05-17 11:50:55 +01:00
Mike Jolley 8a48c7d388 Made exporter and importer screens, classes and directories consistent
Once merged, @claudiosanches @claudiulodro, we should work on
https://github.com/woocommerce/woocommerce/tree/feature/product-csv-impo
rt-export branch going forward and get this merged into it.
2017-05-17 11:24:27 +01:00
Mike Jolley 3d5f1c1fe6 Merge branch 'feature/product-csv-import-export' into feature/csv-importer 2017-05-17 10:36:39 +01:00
Beka Rice 8885d58799 Fix: Re-add date for wc_create_refund 2017-05-17 04:46:56 -04:00
Mike Jolley 34a7f9b3dd Merge pull request #15084 from ryelle/add/profile-field-improvements
Customer Profiles: copy billing address to shipping address
2017-05-16 20:31:05 +01:00
Kelly Dwan 3cb3a1b085 Style & escaping fixes, based on review feedback 2017-05-16 14:01:14 -04:00
Mike Jolley 7205a8e020 Merge pull request #15090 from woocommerce/fix/14763
Use site locale for customer emails.
2017-05-16 17:27:39 +01:00
Claudio Sanches f471a8d846 Merge pull request #15098 from woocommerce/fix/15087
If backorders are enabled, do not make variable products out of stock.
2017-05-16 12:45:10 -03:00
Claudio Sanches 21baa5d230 Merge pull request #15095 from woocommerce/fix/15056
Support searches < 3 chars but with limiting.
2017-05-16 12:44:04 -03:00
Claudio Sanches f7c26dee7b Merge pull request #15079 from woocommerce/fix/settings-api-base-location
Fix 'base location' not being returned via the settings API.
2017-05-16 12:41:28 -03:00
Claudio Sanches 8a987ec822 Merge pull request #15072 from woocommerce/fix/15057
Make calculate tax function clear taxes if disabled on recalculation
2017-05-16 12:38:41 -03:00
Mike Jolley 5939939244 Wizard and blank state 2017-05-16 15:36:56 +01:00
Mike Jolley 7293025c92 Import page placeholder 2017-05-16 15:21:35 +01:00
Mike Jolley 2ba6613abe Hide export menu item 2017-05-16 15:21:29 +01:00
Mike Jolley 74e2f61f0c Import and export buttons 2017-05-16 15:06:22 +01:00
Mike Jolley 6949ee162e Reduce visual noise 2017-05-16 15:05:11 +01:00
claudiulodro 73b7b2d91b Typo 2017-05-16 06:31:52 -07:00
Mike Jolley cb76f38f11 If backorders are enabled, do not make variable products out of stock.
Fixes #15087
2017-05-16 13:06:38 +01:00
Mike Jolley 351b0e0c67 Support limiting in search_customers 2017-05-16 10:16:57 +01:00
Mike Jolley bf613bc922 Limit results to 20 for short strings and allow < 3 chars 2017-05-16 10:16:04 +01:00
Mike Jolley 59e9477730 Merge pull request #15094 from bekarice/fix/php-fatal-undefined-function
Fix Fatal Error: undefined function
2017-05-16 09:34:38 +01:00
Mike Jolley 7ad295d64d Merge pull request #15076 from woocommerce/feature/14385
Show login form on the "pay for order" step
2017-05-16 09:31:53 +01:00
Beka Rice 562c50a3b0 Fix Fatal Error: undefined function 2017-05-16 04:04:47 -04:00
Claudio Sanches 365fbb5c3b Moved main methods to abstract class 2017-05-16 01:43:45 -03:00
Claudio Sanches 1dc14690fb Improved interface including important methods 2017-05-16 01:43:15 -03:00
Claudio Sanches 966090044d Variation support 2017-05-16 01:22:00 -03:00
Claudio Sanches 020e61927b Created abstract product class 2017-05-16 01:02:46 -03:00
claudiulodro 46b9190c9f Remove extra restore_locale 2017-05-15 18:11:23 -07:00
claudiulodro 19047ffb00 Better way of doing it 2017-05-15 18:09:24 -07:00
Claudio Sanches cc05ed77d2 Properly display the importer results 2017-05-15 20:41:19 -03:00
Claudio Sanches 09cf382d29 Initial code to create/update in the CSV importer 2017-05-15 20:23:44 -03:00
Claudio Sanches 8c73073bf5 Updated docblocks for WC_Importer_Interface::import 2017-05-15 20:11:16 -03:00
Claudio Sanches 121f8f6315 Abstract the product importer 2017-05-15 19:49:53 -03:00
claudiulodro 838b175f67 Use store language in customer emails 2017-05-15 14:34:37 -07:00
Kelly Dwan ce06a92e57 Profiles: Add get_user_meta helper, which can fall back on core user fields when applicable, such as first_name, last_name, and email for billing fields. 2017-05-15 17:10:31 -04:00
Kelly Dwan faea811a92 Customer profile: Add a “Copy from billing” button to shipping user meta fields 2017-05-15 17:09:02 -04:00
Claudiu Lodromanean 05132f724c Merge pull request #15067 from woocommerce/fix/15047
$post global is not required in meta box callback
2017-05-15 10:35:07 -07: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
Mike Jolley cfce278840 If logged out, show a form on the payment step so the customer can login.
Closes #14385

To test, create an order pending payment for a USER. If you use the
‘payment’ link on the edit order screen logged out you should see a
login form.

If you create an order and associate no user account, no form should be
shown and you don’t need to login.
2017-05-15 16:53:06 +01:00
Mike Jolley dd798d219e Make calculate tax function clear taxes if disabled on recalculation
Fixes #15057
2017-05-15 14:55:39 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Mike Jolley 31651e41cb Merge pull request #15063 from rasmusbe/unused-vars
Remove unused local variables
2017-05-15 12:45:54 +01:00
Rasmus Bengtsson 4a3902cd48 PHPDoc: Add missing throws statement 2017-05-15 13:39:03 +02:00
Rasmus Bengtsson 4f00d7e5e3 PHPDoc: Add missing return statement 2017-05-15 13:37:59 +02:00
Mike Jolley 87b66cec90 Merge pull request #15061 from rasmusbe/fix-array-duplicates
Remove duplicate entries from defined arrays
2017-05-15 12:33:20 +01:00
Mike Jolley 7c63c21eaf $post global is not required in meta box callback
Fixes #15047
2017-05-15 12:29:11 +01:00
Rasmus Bengtsson 6a7fc8650f Remove unused local variables 2017-05-15 12:06:52 +02:00
Mike Jolley f40dddacc3 Feedback 2017-05-15 10:42:10 +01:00
Mike Jolley 99e63a8ca9 Merge pull request #15054 from woocommerce/improvement/14795
Integrate WC_Order_Query
2017-05-15 10:24:47 +01:00
Rasmus Bengtsson 51fd482206 Remove duplicate entries from defined arrays 2017-05-15 10:48:02 +02:00
claudiulodro 9e9b9b86ba Cant use empty check in customer query var 2017-05-14 17:05:46 -07:00
claudiulodro cec2c3b7dc Couple requested changes 2017-05-13 12:22:22 -07:00
claudiulodro d9c5536cf2 formatting 2017-05-12 15:31:34 -07:00
claudiulodro fe40e9b96a Make date queries work properly 2017-05-12 15:25:15 -07:00
claudiulodro 5b578c389f Use previous filter name 2017-05-12 13:14:52 -07:00
claudiulodro eee2ef82e8 Deprecate ->get_orders 2017-05-12 13:06:17 -07:00
Mike Jolley e777b4d557 Merge branch 'feature/product-csv-import-export' into feature/csv-exporter 2017-05-12 21:03:20 +01:00
claudiulodro 2ce90b3eb6 Slightly better date handling 2017-05-12 12:59:54 -07:00
Mike Jolley 523d9d27cd Styling 2017-05-12 20:40:54 +01:00
Mike Jolley ed32dd558d Nonces and further tidyup 2017-05-12 20:15:08 +01:00
Mike Jolley 0334ed255a Merge pull request #15041 from woocommerce/fix/14985-address
Update all customer fields when updating via checkout
2017-05-12 19:48:20 +01:00
Mike Jolley 5e9f908df7 Merge pull request #15051 from reescott/fixlogtable
Fix #14967 by adding log_id as the secondary sorting column to log list.
2017-05-12 19:47:18 +01:00
claudiulodro 3861e32803 Migrate wc_get_orders 2017-05-12 11:45:01 -07:00
Scott Rees b7b75c83f7 Fix #14967 by adding log_id as the secondary sorting column to log list. 2017-05-12 10:22:31 -07:00
Claudio Sanches a273deffcb Merge pull request #15042 from woocommerce/fix/14978
Ensure get_plugin_updates exists
2017-05-12 13:40:54 -03:00
Mike Jolley c63a3c2c12 tidyup 2017-05-12 17:00:14 +01:00
claudiulodro 824d8898a2 Fix unit tests 2017-05-12 08:44:02 -07:00
Mike Jolley 9faac6f60d Filters 2017-05-12 16:39:02 +01:00
Mike Jolley b0b86f13a0 Add missing columns 2017-05-12 16:16:04 +01:00
Mike Jolley a35df1394c Delay final step 2017-05-12 15:26:53 +01:00
Mike Jolley 0bf749aeac Move js into script file 2017-05-12 15:03:00 +01:00
Mike Jolley 8fe0f03a95 Type exporting 2017-05-12 14:48:30 +01:00
Mike Jolley 3d7533e02b Correct variable name 2017-05-12 12:09:05 +01:00
Mike Jolley 6797b2229d Ensure get_plugin_updates exists
Fixes #14978
2017-05-12 10:56:43 +01:00
Mike Jolley de4e2fc667 Update all customer fields when updating via checkout
Adds set_customer_address_fields helper to make it more DRY

Fixes #14985
2017-05-12 10:43:14 +01:00
Diego Zanella 8fd1366bba #15038 Made WC_Checkout::get_posted_data() public 2017-05-12 10:23:10 +01:00
Claudiu Lodromanean c6fc0003c3 Merge pull request #14971 from woocommerce/improvement/13646
WC_*_Query date queries
2017-05-11 21:43:41 -07:00
Claudio Sanches ed09b4e350 Updated to sanitize data in parse_data method 2017-05-11 11:49:45 -03:00
Claudio Sanches 663c1d5f51 Merge pull request #15012 from woocommerce/fix/14994
Correctly set rating during updates
2017-05-10 19:08:38 -03:00
Mike Jolley 5c6ef16e99 images 2017-05-10 23:05:06 +01:00
Claudio Sanches 9a25f09c7b Included $item to woocommerce_csv_product_import_mapping_options filter 2017-05-10 18:57:57 -03:00
Claudio Sanches 0ec70e6b92 Allow import as meta 2017-05-10 18:56:29 -03:00
Mike Jolley d2c2ead6c4 fix linked product export 2017-05-10 22:53:17 +01:00
Claudio Sanches 44c20f40d7 Merge pull request #15015 from woocommerce/fix/14973
Check we have a valid order in wc_get_payment_gateway_by_order
2017-05-10 18:35:36 -03:00
claudiulodro e31cbfd5c4 Formatting for readibility 2017-05-10 14:33:29 -07:00
Mike Jolley 4cacceeede Variation handling 2017-05-10 22:16:53 +01:00
Claudio Sanches 6f34cdd9cf Skip mapping screen if all fields match CSV default fields 2017-05-10 17:56:00 -03:00
Claudio Sanches 244fb00a27 Initial mapping screen 2017-05-10 17:15:28 -03:00
claudiulodro d461ea86d6 Use local timezone for yyyy-mm-dd queries 2017-05-10 13:08:47 -07:00
Mike Jolley 825dcda917 Selective export 2017-05-10 20:48:56 +01:00
Ninos Ego 89113cf6b2 Added filter for cookie name 2017-05-10 21:46:43 +02:00
claudiulodro db1d5ac987 Simplify logic 2017-05-10 12:02:15 -07:00
Mike Jolley 7c82087bcd Check we have a valid order in wc_get_payment_gateway_by_order
Fixes #14973
2017-05-10 19:54:20 +01:00
claudiulodro a0727fb8a1 Change to date array 2017-05-10 11:49:11 -07:00
Mike Jolley 37a544dd6f Ensure needle is set
Fixes #15004
2017-05-10 19:30:34 +01:00
Mike Jolley 523cf5d4ed Protect against missing order in admin assets
Closes #15000
2017-05-10 19:26:30 +01:00
Mike Jolley cd9119443a Correctly set rating during updates
Fixes #14994
2017-05-10 19:21:38 +01:00
Mike Jolley bc4d36fd3f Add abspath checks
Closes #14999
2017-05-10 19:03:19 +01:00
Claudio Sanches 75def72ff7 Merge pull request #15009 from woocommerce/fix/14970
is_ip_address should be static
2017-05-10 14:48:45 -03:00
Mike Jolley 3ca4ec7927 is_ip_address should be static
Fixes #14970
2017-05-10 18:43:34 +01:00
Mike Jolley 55497b8671 Use VAT for norway 2017-05-10 17:48:03 +01:00
Mike Jolley 11222655e5 Fix publish status 2017-05-10 17:27:31 +01:00