Commit Graph

14686 Commits

Author SHA1 Message Date
Claudio Sanches c0e29d0cbe
Merge branch 'fix/17606' into add/17606 2018-02-21 21:34:38 -03:00
Claudio Sanches fe83dfdba7 Merge branch 'master' into fix/18545 2018-02-21 19:15:45 -03:00
Alex MacArthur bc41fb0ba9 Use wc_get_order(), handle failure in case WC_Order not returned. 2018-02-21 15:39:43 -06:00
Claudio Sanches 7da77237a2 Fixed coding standards 2018-02-21 18:19:38 -03:00
Claudio Sanches 2f6795a2c8 Fixed undefined index after running setup wizard two times on fresh install 2018-02-21 18:15:50 -03:00
Mike Jolley 03a1906706 Post image is enough 2018-02-21 17:21:02 +00:00
Mike Jolley 8d1408fa04 Add WP classes to image gallery 2018-02-21 17:21:02 +00:00
Mike Jolley e614c9ce22
Merge pull request #19069 from woocommerce/fix/19064
Numeric check needs to come after formatting the decimal
2018-02-21 15:08:30 +00:00
Mike Jolley 700246345b Numeric check needs to come after formatting the decimal 2018-02-21 14:02:44 +00:00
Alex MacArthur 931bf27511 Fix spacing, use hash_equals to verify uid. 2018-02-21 07:45:07 -06:00
Alex MacArthur 3e0e75ebc3 Fix spacing issues. 2018-02-21 07:34:56 -06:00
Alex MacArthur 00e71b304d Hash customer email address in download URLs. 2018-02-21 07:34:56 -06:00
Claudio Sanches f60cd7cca4 [REST API] Fixed products shipping_class_id type 2018-02-20 17:16:26 -03:00
Claudio Sanches ef393b8405
Merge pull request #18918 from woocommerce/fix/order-item-meta-key-maxlength
Set maxlength for order item meta key
2018-02-20 16:52:35 -03:00
Claudio Sanches cf934cf45f
Merge pull request #18961 from woocommerce/fix/18958-remove-hardcoded-wp-content
Remove hardcoded /wp-content check for downloads.
2018-02-20 16:17:27 -03:00
Claudio Sanches c80372ad5c
Merge pull request #19027 from woocommerce/update/persistent-cart-filter
Added woocommerce_persistent_cart_enabled filter
2018-02-20 13:57:27 -03:00
Claudio Sanches 44c1de45eb
Merge pull request #19043 from woocommerce/fix/19032
Prevent shortcode [product_page] redirecting to the actual product's page after add to cart
2018-02-20 13:20:08 -03:00
Claudio Sanches 99a72a6929
Merge pull request #19044 from woocommerce/fix/19030
Make terms logic match for breadcrumb and widget
2018-02-20 13:18:11 -03:00
Mike Jolley 7a68cb9c12 Update regex 2018-02-20 16:04:42 +00:00
Mike Jolley 0cda2dba82 Convert more dollar entries for plain text emails 2018-02-20 16:04:42 +00:00
Mike Jolley 472e64270a Check parent status when seeing if variation is purchasable. 2018-02-20 12:34:33 +00:00
Mike Jolley 5330d0b860 Make terms logic match for breadcrumb and widget 2018-02-20 11:49:06 +00:00
Mike Jolley 2a7b09cb52
Merge pull request #19037 from woocommerce/fix/19036-order-date
Show full date for future orders
2018-02-20 11:21:31 +00:00
Mike Jolley c66d676680 Simplify date check 2018-02-20 11:21:00 +00:00
Mike Jolley 86132346df remove action when rendering shortcode 2018-02-20 11:15:09 +00:00
Mike Jolley adde0d6d29
Merge pull request #19042 from woocommerce/fix/shipping-zones-wizard-notice
Prevent shipping zones PHP notice during setup wizard
2018-02-20 10:40:54 +00:00
Caleb Burks 3469d47947 Prevent shipping zones PHP notice in wizard 2018-02-20 02:33:06 -05:00
Caleb Burks 634bee567e Ensure item totals are not empty 2018-02-20 02:19:12 -05:00
Caleb Burks 3d7f674c54 Show full date for future orders 2018-02-19 21:25:03 -05:00
claudiulodro af5cb5df93 Resolve merge conflicts 2018-02-19 10:45:06 -08:00
Mike Jolley 0df57524a7 Added woocommerce_persistent_cart_enabled filter 2018-02-19 16:36:26 +00:00
Mike Jolley 6f855c781f Fix response/ajax handling for #18080 2018-02-19 14:56:30 +00:00
Mike Jolley 5fce9152bd
Merge pull request #18080 from WPprodigy/fix-stock-update-order-notes
Enhancements for stock updates
2018-02-19 14:51:05 +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 0996264e7a
Merge pull request #18609 from woocommerce/fix/18608-add-missing-action-settings-save
Add missing action for settings pages that override save method
2018-02-19 14:43:58 +00:00
Mike Jolley b6ae08a72a Duplicate action 2018-02-19 14:43:28 +00:00
Mike Jolley d5a1463e3e
Merge pull request #18595 from woocommerce/update/add-ext-object-cache-to-system-status
Display whether or not external object cache is enabled
2018-02-19 14:40:14 +00:00
Mike Jolley 5feed3e0cc Merge branch 'master' into update/add-ext-object-cache-to-system-status 2018-02-19 14:39:31 +00:00
Mike Jolley d26c20c0a9
Merge pull request #18831 from woocommerce/fix/list-of-wc-tables
Remove all WC tables when uninstalling the plugin
2018-02-19 14:31:19 +00:00
Claudio Sanches 2aa74a6f66
Merge pull request #19020 from woocommerce/fix/19015
Adds back get_item so you can get a single Webhook
2018-02-19 10:45:33 -03:00
Mike Jolley f1a69688fa
Merge pull request #18982 from woocommerce/tweak/get-image-filter
Pass image to get_image_filter as well
2018-02-19 13:15:55 +00:00
Mike Jolley 594b3773cd
Merge pull request #19025 from woocommerce/fix/18999
Fix double slash and logout link nonce
2018-02-19 13:15:14 +00:00
Mike Jolley 17c28fc8f9 Prevent double slash 2018-02-19 13:14:07 +00:00
Mike Jolley b3d051565f code standards 2018-02-19 13:10:36 +00:00
Mike Jolley a7bff8f1aa
Merge pull request #19024 from woocommerce/pr/19003
Fix check for external resources
2018-02-19 13:07:53 +00:00
Mike Jolley 48e1894258 code standards 2018-02-19 13:06:04 +00:00
Mike Jolley e9bc9d3b1f Indentation 2018-02-19 12:41:55 +00:00
Mike Jolley 68238938e4 Adds back get_item so you can get a single Webhook
Closes #19015
2018-02-19 11:56:57 +00:00
Kathy Darling caf03064ac add getter for class' object property 2018-02-16 15:52:04 -06:00
Kathy Darling 8dc3d689c6 Follow up to #18971. Pass cart/order items through a filter. 2018-02-16 15:51:35 -06:00
Patrick Mladensich 1b290eae6d
Fix check for external resource 2018-02-16 22:51:06 +01:00
Remi Corson ad240278bd Do not display H2 note if no note
This will make the note title not appear if no note is defined. However, some CSS styling is needed as padding was originally added via .wc-order-preview-address wichi was containing the note section.
2018-02-16 15:24:31 +01:00
Jonathan MacGregor c82297ca10
Update wc-account-functions.php 2018-02-16 13:19:50 +00:00
Jonathan MacGregor 29d53969c4 Logout from My Account Menu now appends the nonce 2018-02-16 13:10:17 +00:00
Remi Corson 94802c7a8b Fix #18995
Fixes #18995 by moving the note section outside the addresses container and unlink it from the shipping method conditional statement.
2018-02-16 12:12:15 +01: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
Boro Sitnikovski 927576edb2 Pass image to get_image_filter as well 2018-02-15 16:22:30 +01:00
Mike Jolley 65278efd44 Allow modal to be wider and fix button wrapping 2018-02-15 12:46:47 +00:00
Mike Jolley 654e7db840 Use empty check for search 2018-02-14 18:09:47 +00:00
Mike Jolley d841cf3f27 Conditionally add messages in customiser 2018-02-14 17:25:52 +00:00
Mike Jolley 7ae0f6c274 Hide status button when disabled via filter 2018-02-14 17:00:43 +00:00
Mike Jolley ebc8ff0737 Fallback to closest match if size changes. 2018-02-14 13:43:52 +00:00
Mike Jolley 2f0e88f7ba Improved photon handling 2018-02-14 13:20:34 +00:00
Mike Jolley 66e65cf7bf Disable image regen if photon is being used. 2018-02-14 11:38:18 +00:00
Gerhard Potgieter f3974efb6b Fetch size dynamically 2018-02-14 11:35:16 +02:00
Gerhard Potgieter 0dce1a485c Remove hardcoded check, use dynamic values based on WP_CONTENT_DIR and ABSPATH 2018-02-14 11:29:44 +02:00
Gerhard Potgieter 1961076bf7 Update tools message for image reneneration. 2018-02-14 10:38:59 +02:00
Mike Jolley 0672afdc9f Log cancel event 2018-02-13 19:22:01 +00:00
Mike Jolley 1631c8a09f Cancel button text 2018-02-13 19:21:52 +00:00
Mike Jolley 280ca3757e wc_get_gallery_image_html checks 2018-02-13 19:18:13 +00:00
Mike Jolley 67bef92657 static function 2018-02-13 17:57:45 +00:00
Mike Jolley 154898dec2 make customizer preview temporary 2018-02-13 14:33:45 +00:00
Mike Jolley 52853e9c23 typo 2018-02-13 13:59:54 +00:00
Mike Jolley 755f535f69 Return, to avoid multiple resizes 2018-02-13 13:58:27 +00:00
Mike Jolley 9f9e4027e9 Thumbnail mapping 2018-02-13 12:51:55 +00:00
Mike Jolley e39b6950a8 Notice when regeneration is happening 2018-02-13 12:02:24 +00:00
Mike Jolley 3c7262112e Merge branch 'fix/18842-external-images-fix' into update/3.3-image-handling 2018-02-13 11:18:43 +00:00
Mike Jolley c29da59edf Merge branch 'fix/18842-external-images-fix' into update/3.3-image-handling 2018-02-13 11:17:43 +00:00
Mike Jolley 2b36b5f49f Main image should be larger. 2018-02-13 11:16:42 +00:00
Mike Jolley ebb246d9d3 wc_get_gallery_image_html helper function 2018-02-13 11:16:42 +00:00
Mike Jolley 9499b63e01 Register gallery_thumbnail size 2018-02-13 11:16:42 +00:00
Gerhard Potgieter 794272a732 Do not auto generate images on setting changes or theme switches. Introduce a regenerate button under tools. Only resize images on the fly when using the customizer to preview changes. 2018-02-13 09:55:50 +02:00
Shiva Poudel a283da9a53 Since already initialized on load no need of this 2018-02-13 08:31:11 +05:45
Caleb Burks ea9f799ec6 Remove strlen() condition
Did some tests, substr() is actually faster than the strlen() check.
2018-02-12 17:39:33 -05:00
Claudiu Lodromanean c9bbbf7c5a
Merge pull request #18944 from suifengtec/master
fix: show Maximum size with the size unit on the importer screen
2018-02-12 11:26:55 -08:00
Claudiu Lodromanean 86790b43da
Merge pull request #18941 from woocommerce/update/18929
Allow changing the default product category
2018-02-12 10:07:09 -08:00
Claudiu Lodromanean b5e0450ef3
Merge pull request #18939 from woocommerce/fix/18923
Set status after order is created/updated.
2018-02-12 10:02:50 -08:00
Claudiu Lodromanean c98e0ac43b
Merge pull request #18934 from woocommerce/update/18932
Remove isle of man state
2018-02-12 09:18:13 -08:00
Claudiu Lodromanean 334b543c77
Merge pull request #18908 from woocommerce/fix/18864
Set woocommerce_hide_invisible_variations to true.
2018-02-12 08:50:54 -08:00
Claudiu Lodromanean 3fd4c365b1
Merge pull request #18905 from woocommerce/fix/18891
Use verbose page rules when shop is in the URL, including shop base with category
2018-02-12 08:46:41 -08:00
suifengtec 6aab570544 fix: show Maximum size with the size unit on the importer screen 2018-02-12 23:18:24 +08:00
Mike Jolley 2c45696498 Add a 'make default' button to change the default product category 2018-02-12 13:17:47 +00:00
Mike Jolley e903027c2f
Merge pull request #18895 from woocommerce/fix/remove-attribute-type-column
Remove "Type" column on attributes table by default.
2018-02-12 12:14:54 +00:00
Mike Jolley d5d4f4199e
Merge pull request #18917 from shivapoudel/fix-status
Fix - Help tip for webhook status
2018-02-12 12:09:03 +00:00
Mike Jolley bdd4898946 Set status after order is created/updated. 2018-02-12 11:56:48 +00:00
Tareq Hasan b5ea65b604 Shipping zone documentation help link was printing wrong 2018-02-12 17:17:23 +06:00
Mike Jolley da32586251 Remove isle of man state
Fixes #18932
2018-02-12 10:34:40 +00:00
Caleb Burks 19e3126e54 Add additional wizard next steps 2018-02-10 18:51:25 -05:00
Caleb Burks 0b228c4fda Add ability to go back to prev steps during setup 2018-02-10 18:28:07 -05:00
Shiva Poudel 3ea8629b6e Check admin referer instead of nonce, just like webhooks
CC @claudiosanches
2018-02-10 13:03:22 +05:45
Shiva Poudel 5e7b0e2925 Tweaks and PHPCS fixes 2018-02-10 12:23:33 +05:45
Shiva Poudel 939d8043ec PHPCS fix 2018-02-10 10:41:06 +05:45
Shiva Poudel 25d77e3ddc Use of title for description so screen option will not show for it 2018-02-10 10:17:02 +05:45
Shiva Poudel 14da53001f Tweak - No items found text 2018-02-10 10:14:06 +05:45
Shiva Poudel c35fb04455 Seperate the {create|edit}-key isset check, as it won't work 2018-02-10 10:07:06 +05:45
Caleb Burks 4f447ea48d Sanitize order item meta key w/ max characters 2018-02-09 22:52:36 -05:00
Caleb Burks c278bffa78 Set maxlength for order item meta key 2018-02-09 22:33:35 -05:00
Caleb Burks 221b4672d9 Use wc_has_custom_attribute_types() 2018-02-09 17:31:56 -05:00
Shiva Poudel 71495cef69 Fix - Help tip for webhook status 2018-02-10 02:33:00 +05:45
Mike Jolley 80c07d530d Set woocommerce_hide_invisible_variations to true. 2018-02-09 16:44:41 +00:00
Mike Jolley 6af5bc3d19
Merge pull request #18863 from woocommerce/fix/gallery-array-to-string-conversion
Fix array to string conversion error
2018-02-09 16:42:11 +00:00
Mike Jolley 129134a30f Use verbose page rules when shop is in the URL, including shop base with category 2018-02-09 15:25:33 +00:00
Mike Jolley 7339511495 Height must be int 2018-02-09 14:12:19 +00:00
Mike Jolley 9d898bbf6e Return the resized image after regen, or if regen is not needed 2018-02-09 14:06:00 +00:00
Mike Jolley 961cd6dfa6 Copy sizes to legacy sizes 2018-02-09 14:04:43 +00:00
Caleb Burks 7eae986643 Remove “Type” column on attributes table 2018-02-08 21:36:27 -05:00
Claudiu Lodromanean 170cf2d361
Merge pull request #18888 from woocommerce/fix/18859
Don't prepend cats for regular shortcodes
2018-02-08 10:41:43 -08:00
Claudiu Lodromanean 59b61ab744
Merge pull request #18408 from macbookandrew/downloadable_items_filter
add file array key similar to other functions
2018-02-08 10:38:12 -08:00
Mike Jolley 830a2cb5a5 Don't prepend cats for regular shortcodes 2018-02-08 17:37:56 +00:00
Claudiu Lodromanean 2b96d68047
Merge pull request #18883 from woocommerce/fix/18881
If using get_catalog_ordering_args. remove the args when finsihed
2018-02-08 09:31:11 -08:00
Claudiu Lodromanean becd77ae93
Merge pull request #18880 from woocommerce/fix/18856
Added ability to search for all post statuses
2018-02-08 09:27:01 -08:00
Claudiu Lodromanean b47e264cb3
Merge pull request #18879 from woocommerce/update/category-help-text-polish
Add help text for the default category 2
2018-02-08 09:16:19 -08:00
Caleb Burks 210c22e57c Update docs 2018-02-08 11:58:20 -05:00
Caleb Burks 454c226778 Use wc_help_tip() 2018-02-08 11:52:32 -05:00
Mike Jolley b379e213c8 Allow search_products to find parent ids 2018-02-08 16:36:24 +00:00
Mike Jolley f56e40363b If using get_catalog_ordering_args. remove the args when finsihed 2018-02-08 13:59:03 +00:00
Gerhard Potgieter 2280cabb94 Change on-the-fly image regenration to use same process as backrgound resizing, ensures CDN images are updated and show. 2018-02-08 15:36:50 +02:00
Mike Jolley 7dd9c7fb0e Added ability to search for all post statuses 2018-02-08 12:53:39 +00:00
Mike Jolley b95812d563 Handle quick edit 2018-02-08 12:35:57 +00:00
Rodrigo Primo 3290094ca0 Merge branch 'master' into update/avoid-extra-unneeded-query 2018-02-08 10:00:32 -02:00
Rodrigo Primo b4f6dc45e6 Update option instead of adding it
Doing this since on commit 57ae11c4c6, we stopped deleting the option and thus adding it won't do anything as it will be already present.
2018-02-08 09:54:39 -02:00
Caleb Burks bee4a57403 Fix array to string conversion error 2018-02-07 20:30:37 -05:00
Caleb Burks 4ca94e8f21 Add tooltip for default category 2018-02-07 19:24:43 -05:00
Caleb Burks c8a888acba Add note underneath product categories in admin 2018-02-07 18:12:31 -05:00
Caleb Burks c21cc2e8fe Replace “Cheatin’ uh?” with friendlier messages 2018-02-07 17:01:12 -05:00
Claudiu Lodromanean d6262e0b0e
Merge pull request #18849 from woocommerce/fix/wp-option-updates-spike
Fix spike in update queries on the wp_options table
2018-02-07 13:09:55 -08:00
Claudio Sanches 94318762cc
Merge pull request #18855 from woocommerce/fix/at
Only do unsupported template rendering in the loop
2018-02-07 18:18:46 -02:00
Mike Jolley 35265cdf08 Prevent warning when height is empty 2018-02-07 12:14:07 -08:00
claudiulodro e67634c45f Only do unsupported template rendering in the loop 2018-02-07 11:56:41 -08:00
Rodrigo Primo 57ae11c4c6 Avoid unneeded query to wp_options on every request
This commit changes the value of the option 'woocommerce_queue_flush_rewrite_rules' to 'no' instead of deleting it when rewrite rules are flushed. This way this option is autoloaded and the `get_option()` call below doesn't trigger a select query to the database on every request.

61f037060b/includes/class-wc-post-types.php (L514)
2018-02-07 10:59:06 -02:00
Rodrigo Primo 61f037060b Use 'yes' instead of 'true' as the value of the option woocommerce_queue_flush_rewrite_rules
WC seems to use 'yes' and 'no' instead of 'true' and 'false' as the values of boolean options, so this commit changes the value of the option woocommerce_queue_flush_rewrite_rules to follow this pattern. Also, the string 'false' can induce bugs as it is truthy.
2018-02-07 10:54:01 -02:00
Gerhard Potgieter 8ae28cfe63 Add extra checks before processing on-the-fly regenration images to catch remote files. 2018-02-07 14:52:23 +02:00
Rodrigo Primo f2e7eb98df Fix spike in update queries on the wp_options table
Since WC 3.3.1, the following query is executed on every page load:

```
UPDATE `wp_options` SET `option_value` = '1' WHERE `option_name` = 'current_theme_supports_woocommerce'
```

This is happening because of the following call to `update_option()`:

```
update_option( 'current_theme_supports_woocommerce', current_theme_supports( 'woocommerce' ) ? 1 : 0 )
```

(02cac7d637/includes/class-wc-post-types.php (L268))

`update_option()` shouldn't update the option when the value hasn't changed, but in this case it is updating on every request because, when the current theme supports WC, `1` (integer) is passed to `update_option()` and this function internally compares it against the old value stored in the database which is `"1"` (string). A strict comparison (`===`) is used (f3eaddd2dc/wp-includes/option.php (L343)), so the function assumes that the value changed and proceeds with the update.

This PR fixes this problem by using the values `"yes"` and `"no"` instead of `1` and `0`.
2018-02-07 10:20:33 -02:00
Gerhard Potgieter df0970dd07 Add search label when searching via product crud helper. 2018-02-07 11:02:50 +02:00
Gerhard Potgieter f4acfc9999 Unset the s param when doing a datastore search as it will cause a double search. 2018-02-07 10:44:49 +02:00
Claudiu Lodromanean bc5faec5c0
Merge pull request #18829 from woocommerce/fix/18819
Fix partial refund handling in taxes by date report
2018-02-06 06:30:05 -08:00
Rodrigo Primo 5be9d1b118 Remove all WC tables when uninstalling the plugin
There were two outdated lists of WC tables. One used to drop tables when WC is uninstalled and another one to drop tables when a site is deleted in a multi site environment. This commit creates a new unified list of WC tables, adds the missing tables to this list and introduces a unit test that will fail if the list gets outdated.
2018-02-06 11:19:40 -02:00
Mike Jolley 8fb8039b23
Merge pull request #18818 from woocommerce/fix/prevent-unsupported-downgrade
Don't call WC_Install::install() on downgrades
2018-02-06 12:46:42 +00:00
Mike Jolley a0252af0af
Merge pull request #18511 from woocommerce/update/make-image-gallary-save-crud
Image Gallery missing CRUD calls
2018-02-06 11:38:38 +00:00
Mike Jolley bd72bf89f2 Fix partial refund handling in taxes by date report 2018-02-06 11:31:40 +00:00