roykho
d7493e10e1
Allow user with capabilities to view downloadable image closes #29988
2021-07-29 08:19:35 -07:00
Mehrshad Darzi
e67003b568
change attibutes to attributes
2021-01-23 15:39:01 +03:30
Leif Singer
bc3e6a8532
Price calculation: fix documented return types
...
Fixes #26092 .
2020-12-17 15:35:07 +01:00
Nestor Soriano
52eed70f04
Add a 'NumberUtil' class with a 'round' method.
...
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.
This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
Claudio Sanches
d48f1d4e2e
Fixed package tag usage
2020-08-05 13:36:24 -03:00
Christopher Allford
57734ca8ce
Merge branch 'master' into refactor/add-jetpack-constants
2020-02-04 14:36:35 -08:00
Christopher Allford
6ad091a9b7
Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages
2020-01-28 21:21:29 -08:00
Mike Jolley
083c87338b
Add columns to wc_update_product_lookup_tables
2020-01-20 14:17:25 +00:00
Claudio Sanches
5fdb880831
Merge branch 'master' into feature/24956
2019-12-04 16:18:39 -03:00
Claudio Sanches
8033d5751e
Changed wc_get_product_classname function name to wc_get_product_object
2019-12-04 16:15:16 -03:00
Claudio Sanches
f07ed76e43
Fixed coding standards
2019-12-04 15:53:48 -03:00
Claudio Sanches
b76bebab8d
Improved escaping and HTML formatting
...
Fixed coding standards
2019-12-04 15:52:00 -03:00
Claudio Sanches
adbb4fd2d3
Merge pull request #24937 from jenkoian/wc-placeholder-attrs
...
Add support for custom attributes to wc_placeholder_img().
2019-12-04 15:42:41 -03:00
Claudio Sanches
3519b5bd5c
Merge pull request #25049 from woocommerce/fix/24953
...
Prevent creating products before registering related post types and taxonomies.
2019-12-03 18:02:22 -03:00
Peter Fabian
38db309e07
Updated documentation.
2019-11-15 16:00:51 +01:00
Peter Fabian
45ca8eb867
Prevent creating products before registering related post types and taxonomies.
2019-11-15 15:50:18 +01:00
Claudio Sanches
24c5bf41c8
Set the ID in the current class
2019-11-13 15:30:06 -03:00
Claudio Sanches
b7514b0bfc
Fixed coding standards
2019-11-13 15:30:00 -03:00
Claudio Sanches
24560f93bf
Introduced wc_get_product_classname function
2019-11-13 15:29:55 -03:00
David Stone
0d5c697123
Check that is really an attachment and not the global $post object.
...
Prevents Notices of Trying to access array offset on value of type bool because $src variables will be false.
2019-11-06 00:26:10 -07:00
Ian Jenkins
2340f269cf
Add support for custom attributes to wc_placeholder_img().
...
When displaying a list of images you often want a specific class to be
attached to each image, therefore you pass through a custom class using
the attr parameter. Unfortunately this doesn't get passed through to a
placeholder image should one be needed. This means that, for example, if
you're custom class center an image or something, it won't be honoured
for placeholders, which can lead to some wonky image listings.
You can work around this currently by leverging the
`woocommerce_product_get_image` filter, but it's a bit gnarly as you
need to do some regexing or string splitting or something and checking
class names and what not. This provides a much easier way, by
supporting custom attrs on placeholder images as is the case for non
placehodler images.
2019-10-30 15:08:19 +00:00
mpjason
519d2c3fc1
Update wc_update_product_lookup_tables_column()
...
Adds prepared statement to the 'downloadable' and 'virtual' cases of wc_update_product_lookup_tables_column(). Suggested fix for issue #24681 .
2019-09-24 15:00:59 -04:00
Claudio Sanches
688d35e206
Merge pull request #23562 from benhuson/update/23558-related-product-order
...
Update/23558 Related product order
2019-05-22 19:59:25 -03:00
Gerhard
48e0a25f2f
Add woocommerce_product_post_type_link_parent_category_only to only include the parent category in the slug instead of parent/child
2019-05-07 15:51:49 +02:00
Ben Huson
d81fc1d26d
Allow ordering by ‘none’ when ordering a products array (avoids random ordering). #23558
...
This provides the same functionality as WP_Query. Shuffle/rand remains the default order for backward compatiblity.
2019-04-30 18:46:45 +01:00
Ben Huson
70064b5eb1
Allow disabling of shuffling related posts via `woocommerce_product_related_posts_shuffle` filter. #23558
...
This filter ensures backwards compatibility is maintained.
2019-04-30 18:36:02 +01:00
Mike Jolley
7795ac53ff
Merge pull request #23486 from woocommerce/fix/23475
...
Improved batching for _wc_rating_count lookup table
2019-04-24 16:37:00 +01:00
Mike Jolley
b2e428d4cc
Merge pull request #23455 from woocommerce/update/23388
...
During initial product lookup table generation, set an option
2019-04-24 14:51:47 +01:00
Mike Jolley
6176f565d7
Improved batching for _wc_rating_count lookup table
2019-04-24 13:37:15 +01:00
Peter Fabian
24a5c70b5b
Updated the meta_key for average rating when generating lookup tables.
2019-04-23 19:29:38 +02:00
Mike Jolley
57929f2b09
During initial lookup generation set option
2019-04-23 15:23:47 +01:00
Mike Jolley
ea19f732fd
min/max functions instead of orderby
2019-03-26 14:41:27 +00:00
Mike Jolley
58651e8a2a
When moving data for lookup tables, avoid orderby
2019-03-25 14:23:36 +00:00
Mike Jolley
1e83864667
Improve updates of onsale/virtual
2019-03-14 12:57:48 +00:00
Mike Jolley
062d147b59
When using CLI, run queries without queue
2019-03-14 11:46:41 +00:00
Mike Jolley
53896e3149
onsale lookup
2019-03-13 17:14:20 +00:00
Mike Jolley
e6c60dd6c2
Show notice when regeneration is taking place with link to AS
2019-03-13 12:25:20 +00:00
Mike Jolley
c0c520442c
Queue events in order
2019-03-07 16:24:52 +00:00
Mike Jolley
f0037ea643
split updates
2019-03-07 16:13:47 +00:00
Mike Jolley
0782d39a55
Stock status
2019-03-07 14:32:20 +00:00
Mike Jolley
1ab455ec09
virtual and downloadable
2019-03-07 14:07:51 +00:00
Mike Jolley
dfc539c051
SKU column
2019-03-07 13:34:28 +00:00
Mike Jolley
48a2660f8e
Queue based count population
2019-03-06 14:04:38 +00:00
Gerhard
0b6e8351d6
PHPCS fixes
2019-03-05 13:59:42 +02:00
Mike Jolley
5af9d968e5
Update from master
2019-03-01 10:29:17 +00:00
Mike Jolley
32417e1017
Unused result vars
2019-03-01 10:28:30 +00:00
Mike Jolley
55c49b661e
Missing cache flush when updating sales
2019-02-28 14:51:55 +00:00
Mike Jolley
dc49afc251
Update group by clause
2019-02-27 15:45:05 +00:00
nishitlangaliya
ee621eec8a
fix: filter prefix changed and unit test added for fn:wc_get_product_stock_status_options
2019-02-25 19:03:57 +05:30
nishitlangaliya
53b5be7e83
feat: wc_product_stock_status_options filter added for stock status options for variable product
2019-02-23 11:10:22 +05:30