Commit Graph

138 Commits

Author SHA1 Message Date
Miroslav Matějů 600cbb588d Change the shop page summary
The original summary is not relevant to the customers or visitors
but it was shown to them if the theme displays page summaries.
Changed to a public-friendly text.
2021-08-25 11:41:32 +02:00
Nestor Soriano 6c28cd00a6
Fix: product attribute permalinks not working for non-ascii characters
Product attribute lists permalinks ("/attribute/term") were not working
for attribute names containing non-ascii characters. That's because
when the attribute taxonomy was registered the url rewrite rules were
created using the sanitized version of the attribute name, which
implies converting these characters into the urlencoded version.

The fix consists of applying "urldecode" to the sanitized attribute
name before using it to create the rewrite rule. The sanitization
needs to be kept for compatibility purposes, since it also replaces
latin characters with accents into the non-accent versions
(this conversion won't be affected by "urldecode")
2021-08-06 11:45:49 +02:00
Albert Juhé Lluveras 9ae0b52afd Allow Product Categories and Products Tags to be shown in REST
This way, they can be searched when adding the Product Category Link
and Product Tag Link blocks.
2021-04-27 15:10:01 +02:00
Albert Juhé Lluveras 5ab690e2a0 Add item_link and item_link_description labels to Products, Categories and Tags 2021-04-27 15:09:33 +02:00
Matt Sherman 6044f3e958 Update Products and Reports icons to use Dashicons instead of custom font 2021-02-12 10:37:23 -05:00
sudoshreyansh f1d89e6e78
Fixed taxonomy term message 2020-10-09 13:16:40 +05:30
sudoshreyansh 7f9162d776 Fixed update term messages. Issue: #27831 2020-10-03 22:55:16 +05:30
Hayden Whiteman 201db0ca9e Fix #27436 2020-08-22 17:22:45 +12:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Claudio Sanches eeb08467af
Merge pull request #26877 from woocommerce/fix/26547
Fixed WooCommerce menu for users that can only manage orders on WooCommerce
2020-07-08 12:08:29 -03:00
Claudio Sanches e20a69c35c Fixed missing comma 2020-07-01 17:56:19 -03:00
Claudio Sanches a1eb697bd3
Merge pull request #26634 from corsonr/fix-26633
Fix #26633 - Adds Custom Messages Upon WC Taxonomies Update
2020-07-01 14:36:38 -03:00
Claudio Sanches 101a8ae243
Added context 2020-07-01 14:36:22 -03:00
Claudio Sanches 0757f711de Need to use edit_others_shop_orders also for coupons menu item 2020-06-25 20:34:28 -03:00
Claudio Sanches 8609500cc2 Check for the correct cap for shop_coupon 2020-06-25 20:31:06 -03:00
Claudio Sanches f5b9af8591 Keep WooCommerce menu structure if user can edit others shop orders 2020-06-25 20:01:12 -03:00
Claudio Sanches 6890251b0e
Fixed typos and coding standards 2020-06-23 11:51:19 -03:00
Remi Corson c996434bc1 Fix #26633
Adds custom message upon taxonomies update
2020-05-29 10:58:36 +02:00
Lee Willis f1b6b488b8 Add label to unlabelled taxonomies 2020-03-20 14:58:12 +00:00
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