Commit Graph

119 Commits

Author SHA1 Message Date
Mike Jolley dfcc5e16e5 update wording 2019-04-10 11:51:41 +01:00
Peter Fabian eb99d0f152 Updated back to link for attribute terms. 2019-04-08 18:37:23 +02:00
Mike Jolley 0ae50509ce code standards 2019-03-15 11:25:04 +00:00
Daniel Kudwien 7702f773b9 Fixed WooCommerce writes current_theme_supports_woocommerce option on every page view. 2019-03-14 20:09:43 +01:00
Mike Jolley ae17d6f3bd Avoid handling wc-auto-draft
WC was erroneously adding wc- prefix to the core WP auto-draft status.

#22380 registered it formally but we don't need it.

I've reverted #22380 and handled the prefix correctly.
2019-02-13 17:52:28 +00:00
Ron Rennick bc33f19630 add order draft status filter to allow resuming editing 2019-01-16 09:52:18 -04:00
Ron Rennick e5b39f12c6 register order auto drafts post status 2019-01-08 16:35:54 -04:00
Ron Rennick 95af4c87f8 phpcs sniff fixes for class-wc-post-types.php 2019-01-08 16:34:24 -04:00
claudiulodro d59f165e31 Update block editor hook to new one 2018-10-26 13:48:47 -07:00
Mike Jolley 0599c06b20 Disable Gutenberg for products. 2018-03-27 13:28:03 +01:00
Claudio Sanches 7b1fc4c8e8 Fixed includes/class-wc-post-types.php PHPCS violations 2018-03-21 20:50:40 -03: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
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
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 02cac7d637 If theme support changes, we may need to flush permalinks since some are changed based on this flag. 2018-01-31 21:23:32 +00:00
Philipp Bammes fecc0d00fd
Remove legacy "view" key from register_post_type() 2018-01-18 16:59:53 +01:00
Mike Jolley 93bac7ce04 Adding view_items string 2018-01-15 14:53:26 +00:00
Claudio Sanches 2f6f6112c2 Merge branch 'master' into feature/webhook-crud 2017-12-07 18:21:52 -02:00
claudiulodro d60456cc73 Resolve conflicts and bring up to date with master 2017-12-04 13:56:59 -08:00
Claudio Sanches c6f8e95b97 Merge branch 'master' into feature/webhook-crud 2017-11-28 15:09:10 -02:00
Mike Jolley 39e86db7a7 Use an action/option rather than cron to queue rule flushing
Closes #17851
2017-11-22 11:39:57 +00:00
Mike Jolley fb8db3313e Clarify has_archive 2017-11-10 16:32:43 +00:00
Mike Jolley fe5556b1c0 Disable archive when theme does not support WooCommerce 2017-11-08 16:38:12 +00:00
Claudio Sanches 4762c04b4b Removed shop_webhook post type and removed upgrade scripts
With Webhook CRUD there is no more need to update hooks on database.
2017-08-17 11:37:57 -03:00
Mike Jolley 5ee38c54c2 Option to disable reviews globally 2017-06-08 15:26:30 +01: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
Rasmus Bengtsson 51fd482206 Remove duplicate entries from defined arrays 2017-05-15 10:48:02 +02:00
Mike Jolley cf35375260 Merge branch 'pr/13712' 2017-04-27 11:39:44 +01:00
Mike Jolley 7e056adbae Revise menu titles to match wp admin 2017-04-27 11:39:34 +01:00
Mike Jolley 56eb3c4da3 Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty 2017-04-06 17:50:04 +01:00
Mike Jolley b3198d2546 woocommerce_after_register_post_type action 2017-03-28 12:37:17 +01:00
faisal-alvi 301bc05a19 Update class-wc-post-types.php 2017-03-22 19:11:21 +05:30
Mike Jolley 09f2c6b89a Add locale independent wc_get_permalink_structure function 2017-02-07 16:16:45 +00:00
Mike Jolley 7873a328ce Rewrite should be false
Closes #12589
2016-12-14 11:28:26 +00:00
Mike Jolley d441e34ef5 Support template option
Closes #12544
2016-12-13 14:02:52 +00:00
Mike Jolley 43d018bb97 Attributes are non-hierarchical by default (parent is not supported)
Closes #12530
2016-12-08 11:23:24 +00:00
Mike Jolley 47fbae4d26 Product Visibility Taxonomies (#12527)
* Convert visibility and featured to taxonomy

* Comment

* Add missing tax_queries

* Only check SKU after read.

* Added visibility term for outofstock products to speed those queries up al

* wc_bool_to_string
2016-12-08 10:56:45 +00:00
Justin Stern a3e371e0d7 Make WooCommerce core play nice with Codeception (#11845)
If is_blog_installed() is false then skip some installation steps that
are performed on the 'init' action and which require the database to be
available
2016-11-09 11:53:39 +00:00
Daniel Hüsken ab7f9dd674 Flush rewrite rules with cron for attribute terms (#12132) 2016-10-21 15:29:50 +01:00
Mike Jolley 7ab8c1e35f Get media working when assign to product
Fixes #11760
2016-10-12 13:02:07 +01:00
Claudio Sanches 657c312cae Fix strings case (#12069)
* Fixed case for all _e, esc_attr_e and esc_html_e strings

* Fixed case for all _n_noop strings

* Fixed case for all _x strings

* Fixed case for all __, esc_html__ and esc_attr__ strings

* Fixed a few more strings

* Fixed strings in unit tests

* Fix PayPal Standard case.

* Save Order text
2016-10-12 11:16:30 +01:00
Claudio Sanches a8a77101f3 Fixed product taxonomies names 2016-10-04 13:53:32 -03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Mike Jolley 31fdfcdec4 Remove prefix from tags and cats
Closes #11297
2016-07-27 11:47:30 +01:00
Fulvio Notarstefano 5862a462a9 Make register shop order post statuses filterable 2016-04-19 21:20:55 +02:00
Claudio Sanches 32943b818b Shipping classes do not are hierarchical
cc @mikejolley
2016-03-07 15:19:04 -03:00