• Resolved smys123

    (@smys123)


    This is happening at checkout.

    2020-11-19T00:04:04+00:00 CRITICAL Uncaught Error: Call to a member function __unset() on null in /nas/content/live/petwantsfranch/wp-content/plugins/order-tip-woo/frontend/controllers/main.class.php:124
    Stack trace:
    #0 /nas/content/live/petwantsfranch/wp-includes/class-wp-hook.php(289): WOO_Order_Tip_Main->remove_tip_on_order_placed(43765)
    #1 /nas/content/live/petwantsfranch/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 /nas/content/live/petwantsfranch/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php(88): do_action(‘woocommerce_new…’, 43765, Object(WC_Order))
    #4 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(169): WC_Order_Data_Store_CPT->create(Object(WC_Order))
    #5 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(185): WC_Data_Store->create(Object(WC_Order))
    #6 /nas/content/live/petw in /nas/content/live/petwantsfranch/wp-content/plugins/order-tip-woo/frontend/controllers/main.class.php on line 124

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author railmedia

    (@railmedia)

    Hi there smys123,

    Thanks for reporting this. I’ll look into the issue and get back to you with a solution.

    Best regards,
    Adrian

    Plugin Author railmedia

    (@railmedia)

    Dear smys123,

    If you can, please replace the entire function remove_tip_on_order_placed from the file /wp-content/plugins/order-tip-woo/frontend/controllers/main.class.php (line 120) with the following:

    function remove_tip_on_order_placed( $orderid ) {
    
         if( $this->settings['wc_order_tip_remove_new_order'] ) {
             $wc_session = WC()->session;
             $tip_is_set = $wc_session->get( 'tip' );
             if( $tip_is_set ) {
                 $wc_session->__unset( 'tip' );
             }
         }
    
     }

    I will include this fix in the next release.

    Please let me know how it went.

    Regards,
    Adrian

    Thread Starter smys123

    (@smys123)

    Thanks Adrian,

    I have implemented the change as requested.

    I will have the owner place a subscription order to test.

    Stand by.

    Thanks!
    aaron

    Thread Starter smys123

    (@smys123)

    New set of errors:

    2020-11-24T00:03:04+00:00 CRITICAL Uncaught Error: Call to a member function get() on null in /nas/content/live/petwantsfranch/wp-content/plugins/order-tip-woo/frontend/controllers/main.class.php:124
    Stack trace:
    #0 /nas/content/live/petwantsfranch/wp-includes/class-wp-hook.php(289): WOO_Order_Tip_Main->remove_tip_on_order_placed(43819)
    #1 /nas/content/live/petwantsfranch/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 /nas/content/live/petwantsfranch/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php(88): do_action(‘woocommerce_new…’, 43819, Object(WC_Order))
    #4 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(169): WC_Order_Data_Store_CPT->create(Object(WC_Order))
    #5 /nas/content/live/petwantsfranch/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(185): WC_Data_Store->create(Object(WC_Order))
    #6 /nas/content/live/petwants in /nas/content/live/petwantsfranch/wp-content/plugins/order-tip-woo/frontend/controllers/main.class.php on line 124

    Plugin Author railmedia

    (@railmedia)

    Hi there Aaron,

    Let’s edit the remove_tip_on_order_placed() function once again as follows:

    function remove_tip_on_order_placed( $orderid ) {
    
            if( $this->settings['wc_order_tip_remove_new_order'] ) {
                $wc_session = WC()->session;
                if( $wc_session ) {
                    $tip_is_set = $wc_session->get( 'tip' );
                    if( $tip_is_set ) {
                        $wc_session->__unset( 'tip' );
                    }
                }
            }
    
        }
    Thread Starter smys123

    (@smys123)

    Thanks Adrian,

    Testing, stand by.

    Aaron

    Thread Starter smys123

    (@smys123)

    No fatal errors.

    But it keeps dropping subscriptions into hold.

    Error message:
    11-24-2020 @ 04:48:03 – scheduled action 109955 (subscription payment) failed to finish processing after 300 seconds
    11-24-2020 @ 04:48:03 – action args: subscription_id: 997

    All subscriptions are doing this when the plugin is enabled.

    Thanks for the help!
    Aaron

    Plugin Author railmedia

    (@railmedia)

    Hi there Aaron,

    What plugin for subscriptions is the website using?

    Thread Starter smys123

    (@smys123)

    Hey Adrian,

    We have two:
    WooCommerce All Products For Subscriptions
    WooCommerce Subscriptions

    Thanks,
    Aaron

    Thread Starter smys123

    (@smys123)

    Following up on this, our client would love to use this and have the subscriptions work over the holidays.

    Thanks,
    Aaron

    Plugin Author railmedia

    (@railmedia)

    Hi there Aaron,

    Let me get this straight. You are trying to use the Order tip with Subscriptions? As in adding a tip to each Subscription order automatically?

    Do you have a staging area I could take a look at?

    Regards,
    Adrian

    Thread Starter smys123

    (@smys123)

    Correct, and it works on single orders, and actually on the initial subscription order. However, it causes the renewals to fail and not process automatically.

    Plugin Author railmedia

    (@railmedia)

    Hello Aaron,

    Yes, I understand the problem. However, the plugin does not support at least at the moment WooCommerce Subscriptions or any other subscription based plugin.

    I will, in any case, look into this matter and should there be a future release with subscriptions support, I will let you know.

    Regards,
    Adrian

    Plugin Author railmedia

    (@railmedia)

    I will close this topic for the time being. I will be looking into integrating the order tips with subscriptions.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Fatal Error causing issues’ is closed to new replies.