Getting 0 on Checkout form submit (5 posts)

  1. Damitel
    Posted 3 years ago #

    Hi all,

    I'm getting an error when I try to checkout in mi page, if I miss some inputs like address in the checkout form it behaves as it should and retrieves an error message. But when I submit the form with all the inputs filled I get an "Invalid response" error and a 0 appears over the form.

    I've been checking the issue for a while and I think it's a problem in the checkout.min.js file, when the form is submitted with all the inputs filled the ajax success: is returning 0, so the following parseJSON fails but when it's half filled it returns an object.

    I cannot figure out how to fix this, I've deactivated all plugins, changed the theme, reinstalled WC and WP, but it still happens, any one knows what's the problem?



  2. Damitel
    Posted 3 years ago #

    class-wc-checkout.php was failing here:

    if ($create_new_order) :
    $order_id = wp_insert_post($order_data);

    I had the too-many-redirections issue so the wp_insert_post didn't retrieve an order_id and the checkout failed.

  3. Mike Jolley
    Plugin Author

    Posted 3 years ago #

    Never seen that. If you work out why wp_insert_post is not returning for you please post an issue on github if the problem's our side.

  4. Damitel
    Posted 3 years ago #

    It was a WP permalink problem, so it had nothing to do with woocommerce, but it took some time for me to realize the Checkout crashed in WP's Post.php, not in WC.

  5. Shyju Pulari
    Posted 3 years ago #

    Pleas help me.
    I am using wp e-commerce plugin. Now both cart and checkout form are showing on the same page. How can i move checkout form to another page. How to call that url or that partucular layout.

    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic