Commit Graph

372 Commits

Author SHA1 Message Date
Mike Jolley 1efe7747a8 merge conflict 2019-02-08 13:08:55 +00:00
Mike Jolley b2c33b8e34 Merge branch 'master' into performance/slow-term-queries 2019-02-07 13:49:48 +00:00
Mike Jolley 5f5272ba2e
Merge pull request #22541 from woocommerce/pr/20830
Init cart widget when added to sidebar via the customizer
2019-02-05 10:39:29 +00:00
Mike Jolley a4acf5643a
Merge pull request #22533 from woocommerce/fix/21265
Exclude `paged` from price slider
2019-02-04 10:18:51 +00:00
Mike Jolley 8b7414cfb5 Apply fix to rating filter 2019-02-01 14:13:37 +00:00
Mike Jolley 74cd1ced37 Merge branch 'fix/20710' 2019-01-31 13:37:02 +00:00
Mike Jolley 5b57cb5356 Layered nav should use base link 2019-01-30 16:29:01 +00:00
Mike Jolley e129d18c00 get_current_page_url should not persist 2019-01-30 16:18:56 +00:00
Mike Jolley fa58f3bb9f Lax the kses here - link and name is already escaped. 2019-01-30 16:10:48 +00:00
Mike Jolley 7f4444ef7c direct meta sort 2019-01-25 19:57:06 +00:00
Mike Jolley a38add7ac8 No need for default sorting 2019-01-25 19:55:25 +00:00
claudiulodro 8078e6bfc2 Simplified title check that works on all wc widgets 2019-01-24 10:47:05 -08:00
Mike Jolley 9b655c0ba7 Use hasSelectiveRefresh 2019-01-23 21:29:55 +00:00
Mike Jolley 624700267b Merge branch 'master' into pr/20830 2019-01-23 20:56:35 +00:00
Mike Jolley 536c933612 correctly handle steps
Co-Authored-By: Gerhard Potgieter <kloon@users.noreply.github.com>
2019-01-23 19:39:59 +00:00
Gerhard 31263f2a4c Tax calc for price filter
Co-Authored-By: Gerhard Potgieter <kloon@users.noreply.github.com>
2019-01-23 18:39:45 +00:00
Mike Jolley 3a94fc6d00 Introduce steps and cleanup variable names for clarity 2019-01-23 18:29:33 +00:00
Mike Jolley b9de20ed27 Exclude paged from price slider 2019-01-23 17:34:58 +00:00
Mike Jolley 01696d92b0 Add comments and round to 10 2019-01-23 17:34:51 +00:00
Mike Jolley 613a095362 Exclude paged from price slider 2019-01-23 15:31:26 +00:00
Ron Rennick 8709351994 update function name to `wc_attribute_taxonomy_slug` 2019-01-23 11:11:27 -04:00
Ron Rennick b868b484f7 fix merge conflicts 2019-01-23 10:53:42 -04:00
Ron Rennick 6618d1e626 fix merge conflict 2019-01-10 11:22:31 -04:00
Ron Rennick 951b68be48 phpcs sniff fixes for class-wc-widget-price-filter.php 2019-01-10 11:13:50 -04:00
Ron Rennick 1033217860 only hide price filter widget when archive has no products 2019-01-10 11:12:09 -04:00
Mike Jolley 868e7841e6
Merge pull request #21860 from rellect/wc_case
Rename wc() to WC() for consistency
2019-01-08 14:29:59 +00:00
Mike Jolley 00a8972b68
Merge pull request #22230 from Prospress/fix/22129
add out of stock criteria to tax_query array instead of replacing it
2019-01-07 16:35:32 +00:00
Mike Jolley 0c76db4093 Get instance setting defaults so it shows in customiser before save 2019-01-04 16:11:36 +00:00
Claudiu Lodromanean 34f472fdf2
Merge pull request #22185 from woocommerce/fix/21735
Don't wrap layered nav wp_json_encode string in quotes
2019-01-02 12:01:21 -08:00
Ron Rennick 771a615328 add out of stock criteria to tax_query array instead of replacing it 2018-12-14 14:52:26 -04:00
Ron Rennick 32ae40ffb0 phpcs sniff fixes for class-wc-widget-products.php 2018-12-14 14:50:58 -04:00
Gerhard 7074b0933c Don't wrap wp_json_encode string in quotes, it already does it for us. 2018-12-10 10:14:56 +02:00
Ron Rennick 52f13f8708 fix phpcs sniffs in class-wc-widget-rating-filter.php 2018-12-07 09:27:56 -06:00
Ron Rennick c1ad273a03 replace all remaining str_replace( 'pa_', ... with wc_attribute_taxonomy_name_raw(...) 2018-12-03 11:32:33 -04:00
Ron Rennick 8e7715088e allow limited html in `woocommerce_rating_filter_count` filter 2018-11-13 11:33:44 -04:00
Refael Iliaguyev 127f1cb276 Use WC() instead wc() for consistency 2018-11-08 12:59:07 +02:00
claudiulodro 67d80c35d8 Update cache key to consistently work with all types of chars 2018-09-20 08:21:39 -07:00
Gerhard Potgieter f28002f257 Use wp_json_encode instead of esc_js. Hat tip @dtugend 2018-09-10 14:35:55 +02:00
Gerhard Potgieter 16b2abe8cd Remove charset, WP will load site charset by default. We need to do esc_js first before wp_specialchars_decode to avoid esc_js to encode double quotes again. 2018-09-10 11:58:39 +02:00
Gerhard Potgieter 6b3feb0417 Decode encoded special chars for Any string label used in the layered nav widget. 2018-09-10 10:49:25 +02:00
Rodrigo Primo 20fd569a55 Fix clearing filters in "Filter products by attribute" widget
This commit fixes an issue that was making it impossible to clear filters in the "Filter products by attribute" widget when the attribute name contained non-ASCII characters. The problem was caused by a call to sanitize_title() which doesn't seem necessary as it is sanitizing one of the widget parameters which is already sanitized in 679d719368/includes/widgets/class-wc-widget-layered-nav.php (L116). So this commit simply removes the sanitize_title() call. Even if we needed to sanitize the variable `$taxonomy`, it would be better to use sanitize_text_input_field() or wc_sanitize_taxonomy_name() as sanitize_title() will replace accented characters.

For more about the problem that is fixed by this commit see #21028
2018-08-14 11:45:57 -03:00
Khan M Rashedun-Naby e41a6199bb Updated @todo comment 2018-08-14 13:11:23 +06:00
Khan M Rashedun-Naby 826e94f5a6 Added @todo comment to PHPDoc 2018-08-14 13:03:02 +06:00
Khan M Rashedun-Naby d56edfd53a #20696 Cart widget Customizer selective refresh fix 2018-07-17 22:57:32 +06:00
Mike Jolley 9bead7a702
Merge pull request #20617 from woocommerce/add/20603
Convert product categories widget to use selectWoo.
2018-06-27 18:52:01 +01:00
Gerhard Potgieter 4c54dedd9d Rredirect to shop page when product categories dropdown filter is cleared. 2018-06-26 11:54:04 +02:00
Gerhard Potgieter 345416312a Move selectwoo support to widget class to avoid it running on admin pages. 2018-06-25 15:58:18 +02:00
Mike Jolley 01a3e359c3 Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-06-13 10:18:38 +01:00
Mike Jolley 679d719368 Use correct escaping on placeholder
Use correct escaping on placeholder - this is not HTML, this is an attribute output within javascript code.

Closes #20360
2018-06-04 10:53:10 +01:00
Rodrigo Primo 597033ca6f Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-04-24 13:47:22 -03:00
Ernest 0d70b3b34e Recent Product Reviews template 2018-04-13 14:20:46 +03:00
Rodrigo Primo bb553c88ae Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-03-29 12:05:55 -03:00
Rodrigo Primo edfadcf7ae Product price filter widget: add a new filter to change the query to get max and min prices 2018-03-29 11:52:49 -03:00
Mike Jolley 06418f67e5
Merge pull request #19225 from roylindauer/17355-SplitAndFilter
Split layered nav transient per issue #17355
2018-03-14 12:50:54 +00:00
Roy Lindauer b151480e6b fix indentation issues 2018-03-13 15:34:47 -07:00
Claudio Sanches 82fec65fa0 Merge branch 'master' into update/walkers-phpcs 2018-03-12 12:31:57 -03:00
Claudio Sanches 18a44172a2 Fixed class-wc-widget-top-rated-products.php PHPCS violations 2018-03-09 17:50:02 -03:00
Claudio Sanches b329d81279 Fixed class-wc-widget-recently-viewed.php PHPCS violations 2018-03-09 17:48:28 -03:00
Claudio Sanches d3b81b17a8 Fixed class-wc-widget-recent-reviews.php PHPCS violations 2018-03-09 17:45:45 -03:00
Claudio Sanches f9eed130ec Fixed class-wc-widget-rating-filter.php PHPCS violations 2018-03-09 17:43:52 -03:00
Claudio Sanches dfe3965fbb Fixed class-wc-widget-products.php PHPCS violations 2018-03-09 17:41:07 -03:00
Claudio Sanches 85aba0221a Fixed class-wc-widget-product-tag-cloud.php PHPCS violations 2018-03-09 17:37:23 -03:00
Claudio Sanches 74b5e3f8fa Fixed class-wc-widget-product-search.php PHPCS violations 2018-03-09 17:29:16 -03:00
Claudio Sanches cbb1271b2c Fixed class-wc-widget-product-categories.php PHPCS violations 2018-03-09 17:28:08 -03:00
Claudio Sanches 341dddc3ae Fixed class-wc-widget-price-filter.php PHPCS violations 2018-03-09 17:26:40 -03:00
Claudio Sanches e87c309b01 Fixed class-wc-widget-layered-nav.php PHPCS violations 2018-03-09 17:10:03 -03:00
Claudio Sanches 84b0446736 Fixed class-wc-widget-layered-nav-filters.php PHPCS violations 2018-03-09 16:56:15 -03:00
Claudio Sanches 5cf942c22b Fixed class-wc-widget-cart.php PHPCS violations 2018-03-09 16:37:52 -03:00
Claudio Sanches 4daf256c32 Fixed path of walker classes 2018-03-09 16:31:00 -03:00
Roy Lindauer bb9afb29be
cached_counts would not be defined if cache is false 2018-03-06 07:32:12 -08:00
Roy Lindauer 4147038e93 Add filter to control caching of layered nav counts. Split cached layered nav counts by taxonomy 2018-03-02 22:14:20 -08:00
Mike Jolley 5330d0b860 Make terms logic match for breadcrumb and widget 2018-02-20 11:49:06 +00:00
Mike Jolley 2ed9691c14 Fix shop on homepage with unsupported themes 2018-02-01 11:15:46 +00:00
Claudiu Lodromanean e898623668
Merge pull request #18174 from woocommerce/fix/18170
Adjusts price filter code to exclude taxes to match how prices are stored in the DB
2017-12-18 11:13:44 -08:00
Mike Jolley 5ed3c9e37e Adjusts price filter code to exclude taxes to match how prices are stored in the DB 2017-12-14 15:21:49 +00:00
Boro Sitnikovski 080ece9588 Change method name 2017-12-14 15:37:42 +01:00
Boro Sitnikovski e1b753122e Deprecate the function as a whole 2017-12-14 10:23:51 +01:00
claudiulodro d60456cc73 Resolve conflicts and bring up to date with master 2017-12-04 13:56:59 -08:00
Claudio Sanches 777a004a1f Allow max of 15 products in Recent Viewed Products widget 2017-11-29 19:24:39 -02:00
Mike Jolley 208b2d1b81 Slugs are encoded, so decode before outputting to the form
Fixes #17845
2017-11-21 16:50:33 +00:00
Mike Jolley 46775c2f7d standards 2017-11-20 12:14:05 +00:00
Alexandre GASNE 0018b4349e Fix: Apostrophe wrongly escaped for price nav filter and widget nav filters 2017-11-18 20:11:53 +01:00
Mike Jolley 76adff572e woocommerce_recently_viewed_products_widget_query_args filter
Closes #17678
2017-11-15 10:19:11 +00:00
Mike Jolley cc18f85baa Replace usage of global query 2017-11-09 12:01:27 +00:00
Mike Jolley 1a7d7dd127 Widget base url 2017-11-09 11:24:29 +00:00
Mike Jolley 1b22d97be2 Combined get_page_base_url 2017-11-09 11:16:47 +00:00
Gerhard Potgieter 21377fe5a7 input to button for submit in class-wc-widget-layered-nav.php 2017-11-07 10:56:36 +02:00
Gerhard Potgieter 364d266def PHPCS fixes for class-wc-widget-layered-nav.php 2017-11-07 10:55:27 +02:00
Mike Jolley a6e5a684d0 Merge branch 'pr/17134' 2017-10-27 16:07:41 +01:00
Mike Jolley e5038e737e Standards 2017-10-27 16:07:30 +01:00
Mike Jolley 35f5140e1c Merge branch 'pr/17137' 2017-10-27 15:59:56 +01:00
Mike Jolley 47bb63733b Standards 2017-10-27 15:59:47 +01:00
Mike Jolley 8695d46637 Merge branch 'pr/17041' 2017-10-27 15:35:43 +01:00
Mike Jolley bfebd204ee Code standards and better action names 2017-10-27 15:35:34 +01:00
Mike Jolley 2d021e3786 Merge pull request #17077 from grosssmutttr/patch-2
Update class-wc-widget-layered-nav.php - Avoid duplicate content
2017-10-27 15:19:48 +01:00
Mike Jolley 8fa6116ef6 Hide cat-parent class when category will show no children due to depth setting
Closes #17184
2017-10-13 12:50:49 +01:00
grosssmutttr 1ccec7d156 class-wc-widget-layered-nav.php - Crawling Budget
Additional optimization to save up crawling budget.
Added $link = str_replace('%2C', ',', $link); on line 513

https://mydomain.com/produkt-kategorie/my-category/?filter_filter-color=orange,black

If you add another filter it encodes the existing commas:
https://mydomain.com/produkt-kategorie/my-category/?filter_filter-color=orange%2Cblack&filter_manufacturer=adidas&filter_cut=men.children

So sometimes you have "," as seperator and sometimes you have encoded "%2C".

After implementing this pull-request the seperator stays ",":
https://mydomain.com/produkt-kategorie/my-category/?filter_filter-farbe=orange,black&filter_manufacturer=adidas&filter_cut=men.children

This pull request belongs to the optimization https://github.com/woocommerce/woocommerce/pull/17134 to save up crawling budget,
2017-10-11 14:47:00 +02:00
grosssmutttr d9f0bd5e92 Keep link structure - prevent duplicate content
Added asort($current_filter) so the urls always look the same and there are not millions of urls possibilities when adding multiple filters.

Current url example:
https://myurl.com/produkt-kategorie/mycategory/?filter_filter-color=yellow,brown,blue,red
https://myurl.com/produkt-kategorie/mycategory/?filter_filter-color=yellow,blue,red,brown
https://myurl.com/produkt-kategorie/mycategory/?filter_filter-color=blue,yellow,red,brown
...

With asort you only have this url:
https://myurl.com/produkt-kategorie/mycategory/?filter_filter-color=blue,brown,red,yellow

So it is independent on the sequence a user adds a filter
2017-10-11 08:33:46 +02:00
claudiulodro f1dac6f3ac Use esc_js instead of addslashes 2017-10-09 11:37:09 -07:00
claudiulodro 97d7ae7df8 Missing semicolon 2017-10-09 11:16:24 -07:00