79345567

Date: 2025-01-10 11:41:19
Score: 3
Natty:
Report link

is there a way to omit this function for orders that do not have any shipping? Presently if the order does not have shipping and goes to 'completed' the function creates an error:

Fatal error: Uncaught Error: Call to a member function get_method_id() on bool Stack trace: #0 wp-includes/class-wp-hook.php(324): action_woocommerce_email_order_details() #1 wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #2 wp-includes/plugin.php(517): WP_Hook->do_action() #3 customer-completed-order.php(38): do_action() #4 woocommerce/includes/wc-core-functions.php(345): include('/var/www/vhosts...')

Reasons:
  • Blacklisted phrase (1): is there a way
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): is there a
  • Low reputation (1):
Posted by: Tom Mills