Commit Graph

83 Commits

Author SHA1 Message Date
Claudio Sanches e9abfa1669 Fixed docblock of new hooks of 5.0 2021-01-18 13:44:15 -03:00
Roy Ho 0d2f478eab
Merge pull request #28690 from kevinruscoe/fix/28652
Ensure the orders status is reverted correctly when restoring it.
2021-01-13 13:54:26 -08:00
Kevin Ruscoe a78c1ec99e wp_untrash_post_status should be static as pointed out by roykho 2021-01-13 21:22:30 +00:00
Kevin Ruscoe 91ea67d94c Clean array to make the list a little easier to understand 2021-01-09 15:11:25 +00:00
Kevin Ruscoe 0f7de7e7bf Add 'product_variation' to the list of restored post types 2021-01-09 15:08:51 +00:00
Kevin Ruscoe dd934afc2e Add product to the list of post types that should revert their status upon being restored. 2021-01-09 14:49:29 +00:00
Ron Rennick 82fb9f106d
Merge pull request #27137 from woocommerce/issue_26959
Modify the logic for deleting variations
2021-01-04 13:06:24 -04:00
Kevin Ruscoe 64c4805109 Ensure the orders status is reverted correctly when restoring it. 2020-12-30 13:25:40 +00:00
Omkar Bhagat 00831c707c Revert functon's @since version num back to 3.0 2020-12-21 09:48:34 +05:30
Omkar Bhagat 34563c22bb Inline doc for the new filter
Updated @since to 4.9 and added an inline doc for the new filter
'woocommerce_delete_variations_on_product_type_change'
2020-12-18 17:04:27 +05:30
Omkar Bhagat 87b2d574db Convert the two filters into a single filter
Removing the two newly introduced filters and replacing it with one single filter: woocommerce_delete_variations_on_product_type_change.
2020-09-11 01:29:17 +05:30
Omkar Bhagat 6bca55b6d6 Introduce filters to filter $from and $to
This will introduce two new filters:

woocommerce_from_product_type_changed
woocommerce_to_product_type_changed

to filter the $from and $to variables respectively.

This will be useful in WCS pr_3732!
2020-09-09 00:33:51 +05:30
Omkar Bhagat 4ecb468690 Modify the logic for deleting variations
Implements the following expected behaviour:
1. Switch from variable subscription to non-variable one will delete variations.
2. Switch from variable subscription to variable product and vice-versa will NOT delete any variations.

This shall have no side-effects in WooCommerce Core.
2020-09-09 00:04:39 +05:30
Julià Mestieri b2c35a5ded Added cache and filters for wc-customer get operations. 2020-08-17 11:25:54 +02:00
Claudio Sanches 02cf0dfaed
Merge pull request #27239 from woocommerce/fix/package-tag
Fix usage of "package" tag in file headers
2020-08-07 13:37:24 -03:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Claudio Sanches d073b9d1e3 Always run wp_filter_kses() on coupon codes.
By default it only get sanitized when editing the coupon with an user
that doesn't have unfiltered_html capability.
2020-07-27 16:42:00 -03:00
Peter Fabian 309c48ab0e Deprecated old cache function and replaced it with a new one. 2019-11-28 14:03:57 +01:00
Aslam Shekh 9f8d279b19
Update class-wc-post-data.php
Thanks for the feedback @vedanshujain. As per your suggestion, I have changed hooked to deleted_term_relationships. Please let me know if any.
2019-09-24 11:14:43 +05:30
aslamshekh dce3f4907f Fix - 23913, Delete product query transients when removing terms via wp_remove_object_terms() 2019-06-24 18:58:20 +05:30
Mike Jolley f24a607842 Force delete rather than trash variations on product type change 2019-04-24 11:16:41 +01:00
Mike Jolley 663f724bdd Cleanup methods 2019-03-07 15:08:22 +00:00
Mike Jolley c2411b59c0 Tidy up deprecated methods 2019-02-12 12:15:33 +00:00
Mike Jolley a0e05f972e These transient no longer exist 2019-02-12 11:57:56 +00:00
Mike Jolley 6d78218f97 wc_ln_count_ no longer exists 2019-02-12 11:55:35 +00:00
Ron Rennick 0d0f004c66 update default attribute slug when atribute term slug is changed 2019-01-09 15:10:24 -04:00
Edi Amin 4725bb3e72 Ignore converting float meta value for registered post meta 2018-09-12 20:39:24 +06:00
Claudio Sanches ce8033ddf6 Fixed includes/class-wc-post-data.php PHPCS violations 2018-03-21 20:44:35 -03:00
Mike Jolley 42acec92b9 Force term setting 2017-11-23 16:00:34 +00:00
Mike Jolley 8fe5d6bad0
Merge pull request #17676 from woocommerce/update/17672
Clear transients when product terms are updated
2017-11-17 12:21:53 +00:00
Mike Jolley a50f30f792 Remove filter calling deprecated method 2017-11-14 10:21:29 +00:00
Mike Jolley 3e7968d37b Merge branch 'master' into pr/16418 2017-11-13 14:37:18 +00:00
Mike Jolley 4181033371 Clear transients when product terms are updated
Closes #17672
2017-11-13 12:43:12 +00:00
Mike Jolley 84a15d1110 Filter oEmbeds for certain post types
Orders and coupons have no use for embeds so disable them.
2017-10-02 12:36:58 +01:00
Josh Smith cd89246b87 [#12517] Deprecate process_product_file_download_paths function since download log ids should no longer change based on file paths 2017-08-23 03:16:50 +00:00
Josh Smith 413444c616 Merge remote-tracking branch 'upstream/master' 2017-08-20 04:09:17 +00:00
Nikolay Yordanov 96b4467179 Prevent infinite recursion in WC_Post_Data::variation_post_link()
If a variation's parent doesn't exist, WC_Product_Variation::get_parent_id()
will return 0, which causes WC_Post_Data::variation_post_link()
to enter into an infinite recursion trying to get the permalink
of the nonexistent parent
2017-08-12 11:26:32 +01:00
Josh Smith d8b6b2042a Merge remote-tracking branch 'upstream/master' 2017-08-08 21:20:35 +00:00
Boro Sitnikovski d1dc2a4390 Fix fatal error on deleting refunded order 2017-08-07 11:38:10 +02:00
Josh Smith 644ac674d7 [#12517] Replace download_id on customer download and product download with static UUID instead of filename based hash, to preserve download links, logs, and permissions across filename changes 2017-08-05 04:42:31 +00:00
Mike Jolley dd25736d64 Clean up user is_paying_customer after deleting an order 2017-06-26 18:32:36 +01:00
Mike Jolley f6b9c57b5b Invalidate by ID 2017-05-30 14:37:16 +01:00
Mike Jolley d3666738d8 Merge branch 'pr/15069' 2017-05-23 18:56:58 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Rasmus Bengtsson 6a7fc8650f Remove unused local variables 2017-05-15 12:06:52 +02:00
claudiulodro c3331ff416 Remove unused variable 2017-04-19 10:00:00 -07:00
Mike Jolley fe42b2565c Defer variation parent sync to shutdown rather than cron 2017-04-06 12:25:34 +01:00
Mike Jolley a6080aa4a9 Pass ID, not the product object 2017-04-05 20:21:33 +01:00
Claudio Sanches c856abba3e Change default WordPress auto-draft title for product
This helps handle variations title while syncing variations.

Using a translatable string can led to errors, like a auto-draft started
by an user with WP admin set up as pt_BR and published by an user in
en_GB.
2017-03-15 15:12:49 -03:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00