wordpress-parsi / wp-parsidate

Integrates the Solar Hijri (Persian) calendar in WordPress.
https://wp-parsi.com
GNU General Public License v2.0
52 stars 28 forks source link

Fix convert order date to gregorian in edit order screen #191

Closed mehrshaddarzi closed 1 month ago

mehrshaddarzi commented 2 months ago

in the new version, WooCommerce using HOPS system (seperate table for orders), then not fire post action e.g. save_post in WordPress. We Use Standard Hook Before Save Order.

see: https://github.com/woocommerce/woocommerce/blob/9af58923de458a96173fa4d6ab4292e81de23c64/plugins/woocommerce/includes/abstracts/abstract-wc-order.php#L209

man4toman commented 1 month ago

Thanks @mehrshaddarzi But If we remove the old action, the older version users will faces with problem. Maybe it can be good if we check for HOPS is activated or not and then fire the action.

mehrshaddarzi commented 1 month ago

@man4toman This pull request work all version of WooCommerce even if HOPS not active in user WordPress site. We only change save_post action to standard save order WooCommerce. The woocommerce_before_' . $this->object_type . '_object_save action added from WooCommerce v3.0.0

man4toman commented 1 month ago

Thanks @mehrshaddarzi I'm going to merge this pr, if we found any issue we can rollback and change the action.