• Resolved Salar Gholizadeh

    (@salar6990)


    Hello, Thanks for the nice plugin ??

    When the plugin is active, it causes an 500 server error when refunding some items in native edit order page.
    I’ve Disabled other plugins and tested on store front theme but the result was the same.
    Here is the error log:

    
    PHP Fatal error:  Uncaught Error: Call to undefined method WC_Order_Refund::get_payment_method() in C:\wamp64\www\sdfull\wp-content\plugins\wc-multivendor-marketplace\core\class-wcfmmp-commission.php:60
    Stack trace:
    #0 C:\wamp64\www\sdfull\wp-content\plugins\wc-multivendor-marketplace\core\class-wcfmmp-commission.php(246): WCFMmp_Commission->wcfmmp_checkout_order_processed(30136, Object(WP_Post), Object(WC_Order_Refund))
    #1 C:\wamp64\www\sdfull\wp-includes\class-wp-hook.php(286): WCFMmp_Commission->wcfmmp_new_order_check(Object(WC_Order_Refund), Array)
    #2 C:\wamp64\www\sdfull\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    #3 C:\wamp64\www\sdfull\wp-includes\plugin.php(453): WP_Hook->do_action(Array)
    #4 C:\wamp64\www\sdfull\wp-content\plugins\woocommerce\includes\data-stores\abstract-wc-order-data-store-cpt.php(301): do_action('woocommerce_ord...', Object(WC_Order_Refund), Array)
    #5 C:\wamp64\www\sdfull\wp-content\plugins\woocommerce\includes\data-stores\class-wc-order-refund-data-store-cpt.php(87): Abstr in C:\wamp64\www\sdfull\wp-content\plugins\wc-multivendor-marketplace\core\class-wcfmmp-commission.php on line 60
    
    
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WC Lovers

    (@wclovers)

    HI,

    That’s really strange!

    Are you using all latest plugins?
    Specially what is your WooCommerce plugin version?

    Thank You

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Any update ?

    Thank You

    Thread Starter Salar Gholizadeh

    (@salar6990)

    Hi,
    Yes, I’m always using latest plugins. Besides, this happens on both production and local development sites.
    I tested again today and the problem persists.
    This isn’t happening to you?

    Thread Starter Salar Gholizadeh

    (@salar6990)

    doing this on class-wcfmmp-commission.php:60 fixes the problem:

    
    $payment_method = ! empty( is_a($order , WC_Order::class) && $order->get_payment_method() ) ? $order->get_payment_method() : '';
    

    By the way I don’t know if this would have any side effects.

    Plugin Author WC Lovers

    (@wclovers)

    Really appreciate your help and thanks fo the tip.
    We will this adapt in core.

    Thread Starter Salar Gholizadeh

    (@salar6990)

    My pleasure ??

    Plugin Author WC Lovers

    (@wclovers)

    We have take care of this in WCFM Marketplace 1.2.1, updated here for other users!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘500 internal server error when refunding’ is closed to new replies.