• Resolved err

    (@err)


    Hi!

    I’ve ran into a problem where $available_methods is empty if I’m logged out. I get the “Enter your address to view shipping options.” message, but nothing happens when I filled out the form.

    2 sites, 2 different theme, different plugins, etc, both site stopped to work. Refreshed WC plugin about 12 hours ago.

    Could you please check if everything is alright?

    Do you have any tips I can do now?

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter err

    (@err)

    Found some extra info which maybe helps:

    Invalid argument supplied for foreach() in /wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 2666

    This is corrected, unfortunalety was not related to the original problem.

    • This reply was modified 5 years ago by err.
    • This reply was modified 5 years ago by err.
    Stef

    (@serafinnyc)

    If I remember correctly the first code refers to a shipping class. If it is applied to the product it’ll fulfill the validation.

    Best to paste a copy of your system report to have a look at. That way we can see your setup and see if anything raises concern. You can omit the urls if you didn’t want to share.

    Thread Starter err

    (@err)

    Checked StoreFront preview. It does an AJAX request:

    ?wc-ajax=update_shipping_method&customize_changeset_uuid=17e8e265-8763-477f-a497-1cb94dbc2f49&customize_theme=storefront&customize_preview_nonce=696c724e28

    My theme does not, however everything worked before the latest upgrade.

    No JS error in the console, no related errors in the system report. (Thanks for the tip, Stef. My timezone settings are not ok, but I’m pretty sure it not causing a problem like this.)

    Thread Starter err

    (@err)

    The function wc_cart_totals_order_total_html() kills everything.

    If I create a custom theme for cart totals, and I comment it out, AJAX request is working.

    Thread Starter err

    (@err)

    Solved with rewriting templates and JS, but if you have any tip, I’m still interested.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘$available_methods is empty when logged out + sum price ajax problem’ is closed to new replies.