Skip to content

Instantly share code, notes, and snippets.

@RickardAhlstedt
Created December 8, 2022 09:54
Show Gist options
  • Save RickardAhlstedt/4781709366cbf4860f29067d84f90edc to your computer and use it in GitHub Desktop.
Save RickardAhlstedt/4781709366cbf4860f29067d84f90edc to your computer and use it in GitHub Desktop.
Call to a member function get_shipping_country() on string in /wp-content/plugins/woo-pacsoft-unifaun/src/class-wup-track-shipment.php:33
<?php
...
// Add the following code to line 32 in file /woo-pacsoft-unifaun/src/class-wup-track-shipment.php
// This will ensure that the returned object is actually an object, and not a string that seems to be returned when using wc_get_order
$order = new \WC_Order( $order );
...
?>
CRITICAL Uncaught Error: Call to a member function get_shipping_country() on string in /home/folkness/folkness.com/wp-content/plugins/woo-pacsoft-unifaun/src/class-wup-track-shipment.php:33
Stack trace:
#0 /home/folkness/folkness.com/wp-content/plugins/woo-pacsoft-unifaun/src/class-wup-order-controller.php(261): src\WUP_Track_Shipment::get_tracking_link('40437')
#1 /home/folkness/folkness.com/wp-content/plugins/woo-pacsoft-unifaun/src/class-wup-ajax.php(46): src\WUP_Order_Controller::sync('40437', 'ASPO', true)
#2 /home/folkness/folkness.com/wp-content/plugins/woo-pacsoft-unifaun/plugin.php(116): src\WUP_Ajax::sync_order()
#3 /home/folkness/folkness.com/wp-includes/class-wp-hook.php(308): {closure}('')
#4 /home/folkness/folkness.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#5 /home/folkness/folkness.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /home/folkness/folkness.com/wp-admin/admin-ajax.php(188): do_action('wp_ajax_pacsoft...')
#7 {main}
thrown i /home/folkness/folkness.com/wp-content/plugins/woo-pacsoft-unifaun/src/class-wup-track-shipment.php på rad 33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment