remove_core_hooks(); $content .= $this->get_hook_content( 'woocommerce_thankyou_' . $order->get_payment_method(), [ $order->get_id() ] ); $content .= $this->get_hook_content( 'woocommerce_thankyou', [ $order->get_id() ] ); $this->restore_core_hooks(); return $content; } /** * Remove core hooks from the thankyou page. */ protected function remove_core_hooks() { remove_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 ); } /** * Restore core hooks from the thankyou page. */ protected function restore_core_hooks() { add_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 ); } }