Commit Graph

25819 Commits

Author SHA1 Message Date
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
Mike Jolley 0832202063
Merge pull request #18843 from woocommerce/fix/18757-sku-partial-search
Admin product search fixes
2018-02-07 10:30:02 +00: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
Claudio Sanches 2ef688a8bf 3.3.1 changelog 2018-02-06 14:32:32 -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
Rodrigo Primo f6508856c9 phpcs fixes 2018-02-06 11:17:57 -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
Mike Jolley 815e0d14fd
Merge pull request #18816 from woocommerce/fix/18815
Use add query arg in customizer links
2018-02-06 11:10:53 +00:00
Mike Jolley 9ff0a9717f Adjust query arg 2018-02-06 11:10:28 +00:00
Mike Jolley efc698ece1
Merge pull request #18823 from nishitlangaliya/Issue-18785
rephrasing create a first product to as per suggestion ref #18785
2018-02-06 11:05:26 +00:00
Mike Jolley 0282b9a30b
Merge pull request #18825 from hoangkianh/patch-1
Catalog rows: cast min, max, and value to int
2018-02-06 11:03:00 +00:00
Rodrigo Primo 2110ab5fd0
Merge pull request #18822 from woocommerce/fix/phpcl
Remove extra ?>
2018-02-06 08:49:13 -02:00
Anh Hoang Nguyen 0ec546427e
Catalog rows: cast min, max, and value to int 2018-02-06 14:50:23 +07:00
nishitlangaliya 70ea46d573 rephrasing create a first product to as per suggestion ref #18785 2018-02-06 06:35:15 +05:30
claudiulodro 0c98f5d874 Remove extra ?> 2018-02-05 13:10:50 -08:00
Mike Jolley 0ad37a6426 Use add query arg in customizer links 2018-02-05 17:10:39 +00:00
Rodrigo Primo 13f703fd32 Don't call WC_Install::install() on downgrades
WC doesn't support downgrades but the if condition that decides whether or not to call WC_Install::install() and apply database schema changes was checking if the WC version stored in the database is equal to the WC version in the code. This commit changes the check performed inside the if condition to verify if the WC version stored in the database is smaller than the version in the code. This way `dbDelta()` won't be called automatically by WC and revert database schema changes. This is particulary important for clustered providers where the version of the WC code running in one of the containers could be outdated and trigger a database downgrade.
2018-02-05 14:40:51 -02:00
Rodrigo Primo 16a44964f1 Remove unused code from WC_Tests_Install::test_check_version()
To test the method WC_Install::check_version() it is not necessary to update the of the option 'woocoommerce_db_version' as this method uses only 'woocommerce_version'.
2018-02-05 14:40:43 -02:00
Rodrigo Primo 13351b3d75 phpcs fixes
Removed the print_r() call as phpcs was complaining about it and there is no need to output the version values as phpunit will do that if the test fails.
2018-02-05 14:40:36 -02:00
Claudiu Lodromanean 63f95a4498
Merge pull request #18814 from woocommerce/fix/18797
Fix link button styling
2018-02-05 07:39:40 -08:00
Mike Jolley 079bb0c2a1 Merge branch 'master' into fix/18797 2018-02-05 15:25:08 +00:00
Claudio Sanches 67e56a7243
Merge pull request #18813 from woocommerce/fix/18796-textdomains
Fix esc_attr/esc_html usage
2018-02-05 13:18:00 -02:00
Claudio Sanches f0b99b3f0d
Merge pull request #18812 from woocommerce/update/18802
Tweak customer text
2018-02-05 13:14:16 -02:00
Claudio Sanches a74f95c638
Merge pull request #18811 from woocommerce/fix/18792
Fix import placeholder lookup
2018-02-05 13:01:00 -02:00
Mike Jolley 107f6e86ed Fix link button styling 2018-02-05 15:00:02 +00:00
Mike Jolley e36c05b1d5 Fix esc_attr/esc_html usage 2018-02-05 14:54:18 +00:00
Mike Jolley 00c43e76c1 Tweak customer text 2018-02-05 14:47:12 +00:00
Mike Jolley d674aa71aa Fix import placeholder lookup 2018-02-05 14:33:34 +00:00
Mike Jolley b46ce1c366
Merge pull request #18796 from woocommerce/fix/18795-coupon-editing
Allow removing coupons on editable orders only
2018-02-05 11:23:03 +00:00
Mike Jolley eb7f1f1daf
Merge pull request #18794 from woocommerce/fix/18791-store-notice-alert
Add notice for moved store notice setting
2018-02-05 11:18:02 +00:00
Mike Jolley 735d43d587
Merge pull request #18790 from woocommerce/fix/18787
Fix bulk sale/regular price percentage handling
2018-02-05 11:16:26 +00:00
Mike Jolley eb5a27d53b
Merge pull request #18793 from woocommerce/fix/18789
More specificity on smallscreen style override
2018-02-05 11:14:37 +00:00
Mike Jolley 5cc912c7f6
Merge pull request #18786 from helgatheviking/master
Add grouped_form class to grouped product <form> element. Closes #18763
2018-02-05 11:01:16 +00:00
Mike Jolley 82cde19628
Merge pull request #18807 from shivapoudel/remove/store-notice-js
Remove demo store notice JS
2018-02-05 10:35:11 +00:00
Shiva Poudel 5e48861ba1 Remove demo store notice JS 2018-02-05 10:23:35 +05:45
Caleb Burks 5c2f90905f Compile & Minify 2018-02-02 22:19:24 -05:00
Caleb Burks 9c3611624c Remove extra CSS padding 2018-02-02 22:19:07 -05:00