PHP Fatal error: Uncaught Error: Call to a member function get_view_order_url()
-
Hello Darko,
I’ve upgraded DLM to the latest version (1.5.8) from 1.4.2 and faced PHP Fatal error: Uncaught Error: Call to a member function get_view_order_url() on https://website.com/my-account/digital-licenses/ page.
I have WordPress 6.4.3, Woocommerce 8.3.1 and latest Storefront theme installed.
Full trace: [11-Feb-2024 00:37:42 UTC] PHP Fatal error: ?Uncaught Error: Call to a member function get_view_order_url() on bool in /wp-content/plugins/digital-license-manager/templates/woocommerce/dlm/my-account/licenses/index.php:73 Stack trace: #0 /wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include() #1 /wp-content/plugins/woocommerce/includes/wc-core-functions.php(364): wc_get_template() #2 /wp-content/plugins/digital-license-manager/includes/Integrations/WooCommerce/MyAccount.php(188): wc_get_template_html() #3 /wp-includes/class-wp-hook.php(324): IdeoLogix\DigitalLicenseManager\Integrations\WooCommerce\MyAccount->digitalLicenses() #4 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #5 /wp-includes/plugin.php(517): WP_Hook->do_action() #6 /wp-content/plugins/woocommerce/includes/wc-template-functions.php(3213): do_action() #7 /wp-includes/class-wp-hook.php(324): woocommerce_account_content() #8 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #9 /wp-includes/plugin.php(517): WP_Hook->do_action() #10 /wp-content/plugins/woocommerce/templates/myaccount/my-account.php(34): do_action() #11 /wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/user/...') #12 /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(119): wc_get_template() #13 /wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-my-account.php(72): WC_Shortcode_My_Account::my_account() #14 /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_My_Account::output() #15 /wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(115): WC_Shortcodes::shortcode_wrapper() #16 /wp-includes/shortcodes.php(433): WC_Shortcodes::my_account() #17 [internal function]: do_shortcode_tag() #18 /wp-includes/shortcodes.php(273): preg_replace_callback() #19 /wp-includes/class-wp-hook.php(324): do_shortcode() #20 /wp-includes/plugin.php(205): WP_Hook->apply_filters() #21 /wp-includes/post-template.php(256): apply_filters() #22 /wp-content/themes/storefront/inc/storefront-template-functions.php(352): the_content() #23 /wp-includes/class-wp-hook.php(324): storefront_page_content() #24 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #25 /wp-includes/plugin.php(517): WP_Hook->do_action() #26 /wp-content/themes/storefront/content-page.php(18): do_action() #27 /wp-includes/template.php(792): require('/home/user/...') #28 /wp-includes/template.php(725): load_template() #29 /wp-includes/general-template.php(206): locate_template() #30 /wp-content/themes/storefront/template-fullwidth.php(21): get_template_part() #31 /wp-includes/template-loader.php(106): include('/home/user/...') #32 /wp-blog-header.php(19): require_once('/home/user/...') #33 /index.php(17): require('/home/user/...') #34 {main} ? thrown in /wp-content/plugins/digital-license-manager/templates/woocommerce/dlm/my-account/licenses/index.php on line 73
Quickfix that I implemented – Just commented out line 76 (//’href’ => esc_url( $order->get_view_order_url() ),) in the file woocommerce/dlm/myaccount/licenses/index.php and therefore had to hide this button using CSS.
One more strange thing, right after I upgraded the plugin, I’ve got a Migration message from DLM. Like I used License Manager for Woocommerce plugin before, but I haven’t.
Help me please fix this unexpected issue.
I enjoy using your plugin, thank you!
- The topic ‘PHP Fatal error: Uncaught Error: Call to a member function get_view_order_url()’ is closed to new replies.