TycheSoftwares / order-delivery-date-for-woocommerce

WooCommerce Delivery Date Lite
8 stars 5 forks source link

Getting fatal error when we Untrash the Post from the site. #537

Closed Chetna1510 closed 1 month ago

Chetna1510 commented 5 months ago

Describe the bug Getting fatal error when we untrash the post.

To Reproduce Steps to reproduce the behavior: I'm also able to replicate the issue on my site.

  1. Activate our Order Delivery Date plugin.
  2. Enable HPOS in WooCommerce > Settings > Advanced > Features tab
  3. Go to WordPress > Post page and put one post to Trash and then restore it from Trash tab. You will see the error.

Uncaught Error: Call to a member function get_status() on bool in /home/team-sandbox/public_html/chetna/wp-content/plugins/order-delivery-date-for-woocommerce/includes/class-orddd-lite-common.php:1524

When the HPOS is disabled, it works fine.

Isolating the problem (mark completed items with an [x]):

Additional context https://github.com/TycheSoftwares/order-delivery-date-pro/issues/6587

Chetna1510 commented 1 month ago

The issue is still coming when HPOS is enable and when you restore post

image

Fatal error: Uncaught Error: Call to a member function get_status() on bool in C:\xampp\htdocs\wordpress.local\wp-content\plugins\order-delivery-date-for-woocommerce\includes\class-orddd-lite-common.php:1530 Stack trace: #0 C:\xampp\htdocs\wordpress.local\wp-includes\class-wp-hook.php(326): Orddd_Lite_Common::orddd_lite_untrash_order(437) #1 C:\xampp\htdocs\wordpress.local\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #2 C:\xampp\htdocs\wordpress.local\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #3 C:\xampp\htdocs\wordpress.local\wp-includes\post.php(3838): do_action('untrash_post', 437, 'draft') #4 C:\xampp\htdocs\wordpress.local\wp-admin\post.php(290): wp_untrash_post(437) #5 {main} thrown in C:\xampp\htdocs\wordpress.local\wp-content\plugins\order-delivery-date-for-woocommerce\includes\class-orddd-lite-common.php on line 1530 There has been a critical error on this website. Please check your site admin email inbox for instructions.

Learn more about troubleshooting WordPress.