• Resolved jonrains

    (@jonrains)


    This plugin has been flawless until now. I added a new fee to my site to allow for the selection of an option Rush Fee and it breaks the site on checkout. Everything on the checkout page below the billing and shipping address is missing and there is an error message in its place.

    There has been a critical error on this website.
    Learn more about troubleshooting WordPress.

    Wordpress 5.7.1
    WooCommercer 5.2.1
    Avada Theme 7.3
    WooCommerce Extra Fees Plugin Premium 3.6.2

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jonrains

    (@jonrains)

    Sorry, should have mentioned this site is on a staging server that is not publically available so I cannot share a link. But any ideas on what could be happening would be appreciated.

    Thread Starter jonrains

    (@jonrains)

    I turned on logging and this is what I get.

    2021-04-15T18:03:28+00:00 CRITICAL Uncaught Error: Using $this when not in object context in .../wp-content/plugins/woocommerce-conditional-product-fees-for-checkout-premium/public/class-woocommerce-conditional-product-fees-for-checkout-public.php:1026
    Stack trace:
    #0 .../wp-includes/class-wp-hook.php(292): Woocommerce_Conditional_Product_Fees_For_Checkout_Pro_Public::add_option_to_checkout__premium_only(Object(WC_Checkout))
    #1 .../wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 .../wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 .../wp-content/plugins/woocommerce/templates/checkout/form-shipping.php(69): do_action('woocommerce_aft...', Object(WC_Checkout))
    #4 .../wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/wp_qjg9xb...')
    #5 /home/wp_qjg9xb/ in .../wp-content/plugins/woocommerce-conditional-product-fees-for-checkout-premium/public/class-woocommerce-conditional-product-fees-for-checkout-public.php on line 1026
    Plugin Support Hitendra Chopda

    (@hitendra-chopda)

    Hello jonrains,

    We are looking into your query and get back to you soon.

    Best Regards,
    Hitendra & Dotstore Team

    Plugin Support Hitendra Chopda

    (@hitendra-chopda)

    Hello Jonrains,

    Hope you are doing well.

    We have trouble with your query in detail at our side and unable to get any issue.

    So, this issue might be due to some accessibility of function, or might your currency not fully supported.

    There is one quick solution given the below might work.

    Please change below one line.

    File path: “wp-content/plugins/woocommerce-conditional-product-fees-for-checkout-premium/public/class-woocommerce-conditional-product-fees-for-checkout-public.php”

    Line no: 1026

    From: $fees_cost = $this->wcpfc_pro_price_format( $fees_cost );

    To: $fees_cost = floatval( $fees_cost );

    If still does not work then please share your site report “Woocommerce > Status Select Get System Report”, then “copy and paste” here in the thread so we can check all the activated plugins, etc.

    Thanks,
    Hitendra & Dotstore Team

    Thread Starter jonrains

    (@jonrains)

    It appears that your line of code has resolved the issue and it now works. Thank you for your help. There is no need to proceed with our zoom call. Thank you for all your help.

    Thread Starter jonrains

    (@jonrains)

    One question, now that it is working, is there any way to move the Optional Fee checkbox down to where the rest of the fees are displayed? If the Option Fee is checked the fee appears correctly and in the correct place, however the checkbox is small and up the page next to an optional order notes field we are using which is also under Ship to a different address check box. I would really like the check box to be after the shipping cost where all the other fees are. That way the customer can see their shipping and total cost and then decide wether they would like to check the box to add an additional Rush Fee onto their order. It would be really great if you can supply me with line of code to make this adjustment. Thanks again.

    Plugin Support Hitendra Chopda

    (@hitendra-chopda)

    Thank you Jonrains, for sharing your feedback and we are glad to know that the given solution is working for you.

    Related to the position of the optional fee we have set the default but you can change it based on your theme layout and using the different hooks.

    Can you please add below one filter in your themes functions.php file and might it work for you.

    function optional_fee_display_default_hook_custom( $default_title ) {
      return 'woocommerce_review_order_before_payment';// here you can check by adding the different hooks from below reference link
    }
    add_filter( 'optional_fee_display_default_hook', 'optional_fee_display_default_hook_custom', 10,1 );

    For the different hooks of the checkout page click here.

    Hope this helps. Let me know still if any.

    Best Regards,
    Hitendra & Dotstore Team

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Optional Fee activation breaks site’ is closed to new replies.