Commit Graph

713 Commits

Author SHA1 Message Date
barryhughes 1a2140ff43 Drop/remove auto-generated ID attr for select labels. 2021-04-16 11:04:44 -07:00
barryhughes 27db35de67 Update SelectWoo to 1.0.9 and take advantage of data-label support. 2021-04-15 16:55:29 -07:00
Nestor Soriano 8729733da4
Escape short description 2021-04-05 11:58:37 +02:00
Claudio Sanches d8735d7225
Merge pull request #29151 from woocommerce/hide_coupon_on_incomplete_checkout
Prevent displaying coupon form on checkout requiring login
2021-03-03 17:05:53 -03:00
Néstor Soriano 9c2b8ac9fd
Remove extra space at end of a couple of lines 2021-02-18 09:38:17 +01:00
Niels Lange e9d425ba65
Update includes/wc-template-functions.php
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2021-02-17 21:09:18 +07:00
James Allan 264bccf505 Prevent displaying coupon form on checkout requiring login 2021-02-17 11:42:30 +10:00
Niels Lange 63cac6fb82
👌 IMPROVE: Add body class woocommerce-shop to shop page 2021-02-08 14:55:07 +07:00
Claudio Sanches 0bd9c11b44 Fix conditional 2021-02-01 19:30:43 -03:00
Claudio Sanches 31af5530e0 Proper implementation of wp_robots_no_robots 2021-02-01 19:15:10 -03:00
Vedanshu Jain f44d160256
Merge pull request #28880 from woocommerce/fix/issue-28805
Add in optional semicolon closes #28805
2021-01-29 17:21:15 +05:30
Claudio Sanches 41d26ea283 Use wp_robots_no_robots() when available
Adds support for WP 5.7 wp_robots_no_robots().
Note that wp_no_robots() is deprecated on WP 5.7.
2021-01-26 20:00:02 -03:00
roykho 0bdf9a6341
Add in optional semicolon closes #28805 2021-01-21 06:27:44 -08:00
Rodrigo Primo 93dae948b2 Add placeholder text to country select field in the checkout page
This commit adds the 'Select a country / region...' text as a placeholder text displayed in the country select field indicating to the user that they need to select a country. This is only needed when the option ¨Default customer location" is set to "No location by default".
2020-12-10 11:12:39 -03:00
Rodrigo Primo 5554f9c6f9 Revert "Sets Select a country option element value attribute to default."
This reverts commit 9faee1d909 as it causes issues during checkout (see #27521).
2020-12-10 10:09:02 -03:00
Claudio Sanches cba0cc4799
Revert "Load product category content with content-product-cat.php" 2020-11-23 20:52:27 -03:00
Claudio Sanches f1f2c3cfff Load product category content with content-product-cat.php 2020-11-10 20:54:59 -03:00
Claudio Sanches c5ff759d61 Revert changes introduced in #27289 2020-10-26 10:26:29 -03:00
Claudio Sanches 631c06020c
Merge pull request #27800 from gbiorczyk/fix/field-label-escaping
Escaping output for field label
2020-10-19 20:26:38 -03:00
Claudio Sanches 6ad79cf050 Fixed PHP notice
> PHP Notice: compact(): Undefined variable: gallery_image_ids in includes/wc-template-functions.php on line 1487
2020-10-14 15:37:12 -03:00
Claudio Sanches 47a7c6648a
Update includes/wc-template-functions.php 2020-10-14 15:29:24 -03:00
Ron Rennick 4a8898dfbd restore $attachment_ids for product thumbnails template 2020-10-08 15:08:03 -03:00
Ron Rennick 67a54b3aa3
Merge pull request #27289 from woocommerce/fix/27222
use first gallery image on single product when image not assigned
2020-10-07 15:06:30 -03:00
Mateusz Gbiorczyk b730298ee6 Escaping output for field label 2020-09-29 14:25:56 +02:00
Martin Adamko c2ab6a488d
Encapsulate scope of `c` variable
By changing to auto invoking call the `c` variable will be encapsulated in its scope therefore not polluting the global scope and will continue to function as previously.

Fixes conflict and reassigning of already used variables when using other minified scripts. In my case the problem occurred with the Speed Booster Pack plugin.
2020-09-08 09:20:18 +02:00
Ron Rennick e49527cf9d apply changes from feedback 2020-08-28 11:34:32 -03:00
Ron Rennick 51afe3207a
Merge pull request #27023 from HikeMike/add/hidden-form-field
"Hidden" field type added to woocommerce_form_field() #26468
2020-08-20 11:48:26 -03:00
Ron Rennick 84d6d6c525 move image id logic to woocommerce_show_product_* 2020-08-12 15:31:27 -03:00
Nestor Soriano 2283a4c7fd Revert woocommerce_product_loop to use have_posts instead of wc_get_loop_prop( 'total' ). 2020-07-28 09:01:55 +02:00
Néstor Soriano e9d692f455 Apply suggestions from code review
Mostly adding "since 4.4.0" annotations and updating
db update functions from 4.2 to 4.4.

Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2020-07-28 09:01:55 +02:00
Nestor Soriano 50e8f27bc7 Fix visibility of variable products with layered nav filtering.
The layered nav filtering doesn't work well with variable products
when some variations have stock and other don't. When a term is
selected in the widget, a variable product having no stock for
the variation corresponding to that term but having stock for
other variations will be displayed, but it shouldn't.

This commit fixes that by introducing two changes:

- A new override of "is_visible" for WC_Product_Variable that
  looks at the supplied filters, compares them against the corresponding
  available variations and calculates the visibility based on
  the query type (OR or AND).

- A hook on the "found_posts" filter in WC_Query, that adjusts
  the posts count based on the found products visibility
  when there are filters available; this is needed to sync the
  "displaying X posts" messages and the paging when variable
  products are hidden due to stock status.

Additionally, the visibility calculated in "found_posts" is cached
as loop variables so that it isn't calculated again when actually
displaying the products.
2020-07-28 08:55:52 +02:00
Nestor Soriano c27283dffe Fix code sniffer errors in some files.
Fixed files:

includes/abstracts/abstract-wc-product.php
includes/class-wc-query.php
includes/wc-template-functions.php
includes/widgets/class-wc-widget-layered-nav.php
templates/loop/result-count.php
tests/unit-tests/util/class-wc-tests-wc-query.php
2020-07-28 08:47:29 +02:00
Mike Dent 541f68363e Test code updated, with thanks to @ObliviousHarmony 2020-07-20 15:45:13 +01:00
Mike Dent 53d9085c16 Fixed indent and incomplete test code. 2020-07-12 19:26:57 +01:00
Mike Dent cf9db99a9f "Hidden" field type added to woocommerce_form_field() #26468 2020-07-12 16:38:36 +01:00
Néstor Soriano 3a77066262
Merge pull request #26554 from jeffreyscottfrench/Fix--select_country-default-value
Sets "Select a country / region..." option element's value attribute to default in checkout page.
2020-06-30 10:34:06 +02:00
Peter Fabian 14a26aca2c Update min files and selectWoo 2020-06-16 17:15:12 +02:00
Dor Elidan 4b6e56b02a
Update wc-template-functions.php 2020-06-05 18:22:34 +03:00
Gregory Karpinsky 3d02da9a03
Update wc-template-functions.php
Fix variable name in docblock
2020-05-31 08:43:44 -04:00
Jeffrey Scott French 9faee1d909 Sets Select a country option element value attribute to default. 2020-05-19 15:07:27 -04:00
Philipp Bammes 0097beef17
Fix typo in DocBlock of `woocommerce_template_loop_product_link_close()`
Replace `opening` with `closing`.
2020-02-07 16:51:12 +01:00
Christopher Allford 57734ca8ce Merge branch 'master' into refactor/add-jetpack-constants 2020-02-04 14:36:35 -08:00
Christopher Allford 4ae1e1f5fc Extracted the repetitive Constants::get_constant( 'WC_VERSION' ) calls where possible 2020-02-04 14:02:57 -08:00
Claudio Sanches e0ee96cd37
Merge pull request #25418 from helgatheviking/feature/quantity-placeholders
Add support for placeholders in quantity inputs
2020-02-04 14:05:39 -03:00
Christopher Allford 1d1413b4ee Replaced direct access of many constants with the Constants library 2020-01-31 22:18:47 -08:00
Peter Fabian 7c07b192af Changed country to country/region label. 2020-01-30 12:42:41 +01:00
Kathy Daring 917795d78f Add woocommerce_quantity_input_placeholder filter 2020-01-20 10:27:45 -07:00
Kathy Daring bcb17b62c2 Add support for placeholders in quantity inputs
(cherry picked from commit 99eb5074f3)
2020-01-16 12:47:15 -07:00
Rodrigo Primo 2c74233be2 Fix WordPress.WhiteSpace.DisallowInlineTabs violations
This commit fixes all violations of the WordPress.WhiteSpace.DisallowInlineTabs sniff automatically using phpcbf.
2019-12-20 14:27:07 -03:00
Claudio Sanches 4ea81923da
Merge pull request #24935 from woocommerce/fix/24845-wpcom-customizer
Do not run send_frame_options_header when on the customizer
2019-12-05 20:28:55 -03:00