Title: Custom checkout form
Last modified: August 31, 2016

---

# Custom checkout form

 *  Resolved [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/custom-checkout-form/)
 * I’m trying to set up a custom checkout form but can’t seem to get it working.
   
   What is the best way to make a custom checkout form to bypass the checkout page(
   I create the cart order through AJAX and want to just pay for it with only the
   payment method and directly land in the thank you page)?
 * [https://wordpress.org/plugins/jigoshop/](https://wordpress.org/plugins/jigoshop/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * (@azrielnefezen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092453)
 * Hi lakhai,
    And what about the client’s details? Billing, Shipping address? Could
   you explain what exactly are you trying to achieve and how what did you try so
   far?
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092489)
 * Wow, that was a quick response!
    Alright, so I had this working on a very old
   version of the plugin. What I did was explained a bit better here: [http://stackoverflow.com/questions/35548357/jigoshop-custom-checkout-form](http://stackoverflow.com/questions/35548357/jigoshop-custom-checkout-form)
   After this I experimented a bit (and remembered some, too) and had to remove 
   via:
 *     ```
       $billing_fields = array(
       	 array( 'name'=>'billing-first_name', 'label' => __('First Name', 'jigoshop'), 'placeholder' => __('First Name', 'jigoshop'), 'required' => false, 'class' => array('form-row-first') ),
       	 array( 'name'=>'billing-last_name', 'label' => __('Last Name', 'jigoshop'), 'placeholder' => __('Last Name', 'jigoshop'), 'required' => false, 'class' => array('form-row-last') ),
       	 array( 'name'=>'billing-address', 'label' => __('Address', 'jigoshop'), 'placeholder' => __('Address', 'jigoshop'), 'required' => false ),
       	 array( 'name'=>'billing-city', 'label' => __('City', 'jigoshop'), 'placeholder' => __('City', 'jigoshop'), 'required' => false ),
       	 array( 'validate' => 'postcode', 'format' => 'postcode', 'name'=>'billing-postcode', 'label' => __('Postcode', 'jigoshop'), 'placeholder' => __('Postcode', 'jigoshop'), 'required' => false, 'class' => array('form-row-first') ),
       	 array( 'type'=> 'country', 'name'=>'billing-country', 'label' => __('Country', 'jigoshop'), 'required' => false, 'class' => array('form-row-last') ),
       	 array( 'name'=>'billing-email', 'validate' => 'email', 'label' => __('Email Address', 'jigoshop'), 'placeholder' => __('***@yourdomain.com', 'jigoshop'), 'required' => false )
       	 );
       	 jigoshop_checkout::instance()->billing_fields = $billing_fields;
       ```
   
 * Worked a few times (to not give me an error for missing fields, but then it didn’t
   work anymore…
    Apart from that, I changed the nonce field to `pay` and I got 
   an “Incorrect action” error, which on the old plugin it didn’t work either. I
   also added a hidden input field with the name `submit_action` with the value `
   place_order` but still didn’t change the action.
 * What I need is to just choose either “account funds” or “credit cards” (which
   needs card details such as number, code, etc.) and with only this it’ll pay for
   the order and go directly to the “thank you” page.
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092625)
 * Anybody has an idea?
 *  Plugin Author [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * (@azrielnefezen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092657)
 * Well, for starters, I honestly don’t know if we even have a payment gateway like
   that.
    What is more – you’d break the current order mechanic. I’d need to see
   the exact soluiton you’re trying to apply for me to help you.
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092659)
 * I already had this working in the past, after removing all the required fields
   you could checkout with only the payment gateway and nonce field.
    My payment
   gateways are “Jigoshop Stripe” and “Account Funds” both working perfectly too.
   I can provide whatever detail you need, just let me know.
 *  Plugin Author [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * (@azrielnefezen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092670)
 * And now you’re getting “Action failed”, right?
    Try this in your theme’s functions.
   php :
 *     ```
       add_filter( 'nonce_life', function () { return 120 * HOUR_IN_SECONDS; },-1 );
       add_filter( 'nonce_user_logged_out',function(){return true;},-1);
       ```
   
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092689)
 * Nope, still action failed…
 *  Plugin Author [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * (@azrielnefezen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092690)
 * Wait, wait, wait…you changed the nonce field to “pay”?
    Try changing it back 
   to nonce.
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092691)
 * Actually I was using place_order, which is what my old form had. Let me try that.
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092692)
 * Neither of those worked, “place_order” and “pay” both give “action failed” error
 *  Thread Starter [lakhai](https://wordpress.org/support/users/lakhai/)
 * (@lakhai)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092718)
 * And now for some reason when I try to normally pay for the order form the checkout
   page I have the required fields error too…
 *  Plugin Author [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * (@azrielnefezen)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092728)
 * Ok – try contacting us via the contact form on jigoshop.com, I’ll try to resolve
   this issue.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Custom checkout form’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jigoshop_655549.svg)
 * [Jigoshop](https://wordpress.org/plugins/jigoshop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jigoshop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jigoshop/)
 * [Active Topics](https://wordpress.org/support/plugin/jigoshop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jigoshop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jigoshop/reviews/)

## Tags

 * [checkout](https://wordpress.org/support/topic-tag/checkout/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [form](https://wordpress.org/support/topic-tag/form/)

 * 12 replies
 * 2 participants
 * Last reply from: [Jigoshop Support – Marcin](https://wordpress.org/support/users/azrielnefezen/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/custom-checkout-form/#post-7092728)
 * Status: resolved