• You have forgotten to write a method with name get_renew_order_id in the class YWSBS_Subscription …

    I found it out when, I got below fatal error:

    [22-Nov-2023 11:07:10 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method YWSBS_Subscription::get_renew_order_id() in 
    /home4/uxrbttmy/public_html/www/wp-content/plugins/yith-woocommerce-subscription/includes/gateways/paypal/includes/class.ywsbs-paypal-ipn-handler.php:300
    Stack trace:
    #0 /home4/uxrbttmy/public_html/www/wp-content/plugins/yith-woocommerce-subscription/includes/gateways/paypal/includes/class.ywsbs-paypal-ipn-handler.php(160): YWSBS_PayPal_IPN_Handler->paypal_ipn_request(Array)
    #1 /home4/uxrbttmy/public_html/www/wp-content/plugins/yith-woocommerce-subscription/includes/gateways/paypal/includes/class.ywsbs-paypal-ipn-handler.php(85): YWSBS_PayPal_IPN_Handler->process_paypal_request(Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
    #2 /home4/uxrbttmy/public_html/www/wp-includes/class-wp-hook.php(324): YWSBS_PayPal_IPN_Handler->valid_response(Array)
    #3 /home4/uxrbttmy/public_html/renewal.fashionexpr in /home4/uxrbttmy/public_html/www/wp-content/plugins/yith-woocommerce-subscription/includes/gateways/paypal/includes/class.ywsbs-paypal-ipn-handler.php on line 300
    

    I have written the method in class YWSBS_Subscription as follow to fix the problem:

    public function get_renew_order_id(){
       $renew_order = $this->get( 'renew_order' );
       return is_object($renew_order) && method_exists($renew_order, 'get_id') ? $renew_order->get_id() : (int)$renew_order;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Alberto Ruggiero

    (@witcher83)

    Hello @pexlechris

    thanks for reporting, i’ll forward it to the development team.

    Thread Starter Pexle Chris

    (@pexlechris)

    Also I get a similar error

    PHP Fatal error: Uncaught Error: Call to undefined function ywsbs_get_max_failed_attempts_by_gateway() in /home4/uxrbttmy/public_html/www/wp-content/plugins/yith-woocommerce-subscription/includes/gateways/paypal/includes/class.ywsbs-paypal-ipn-handler.php:732

    Plugin Support Alberto Ruggiero

    (@witcher83)

    Hello @pexlechris

    we have released a plugin update that will fix these issues.

    Please update and let us know!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Forgot a method and renew crashes’ is closed to new replies.