WooCommerce Extension - Payment Step
When "Create Entry" is enabled for a form, the Payment Step will send an assignee email containing a payment link to the customer (the email address in the customer’s user profile) or the “Billing Email” address in the case of a guest checkout of a WooCommerce Order. You’ll want to add an Approval Step or a User Input step before the Payment Step, otherwise, the email will be sent out right away when an order created.
The payment link will lead the customer to the WooCommerce “Pay for Order” page, where the payment information can be entered (this depends on the gateway chosen). This will complete the checkout process. Note the Gravity Flow Gateway won’t be available on this page.
If the customer was logged in at the time of placing the order at the checkout then all the entries on a Payment Step will be listed in their workflow inbox. The workflow inbox can be accessed either via the admin UI and/or via the frontend shortcode. See the documentation for the inbox shortcode for further details. When the logged in user clicks on the entry in the inbox they will see the workflow entry detail page with a link to pay for the order.
As with all workflow entries, the status page will display all the past entries for the current user. Gravity Forms admins see all entries. See the status shortcode for further information.
Payment Step Settings
Display Fields: You can select which fields to display in the workflow details page. The “Order Summary” checkbox only appears if you have pricing fields in your form.
Emails: We add two merge tags can be used in Message - “{workflow_woocommerce_pay_link} (supports the “text” attribute, the default is "Pay for this order")” and “{workflow_woocommerce_pay_url}”. If your store allows “guest checkout”, you must put a payment link in your email or there is no way a guest can come back to pay for an order. For registered users, they can also find the “Pay” link in their “My Account - Orders” page.
Update Order Status (Added since 1.1)
When "Create Entry" is enabled for a form, the shop manager can see the action drop-down "Update Order Status" in the Workflow details, if the entry pauses at the Payment Step.
This will be useful if you use some offline gateways in WooCommerce, which usually set orders to "on-hold" when they are created, and shop manager has to manually mark the orders as paid in WooCommerce Orders. Now you can perform such actions in the Workflow details.
Release Entries on Specific Payment Statuses (Added since 1.1)
By default, entries will be released from a Payment Step when their payment status is updated to "Processing," "Completed" or "Failed." If you want them to be released only in certain statuses, you can use the following snippet:
// allow only one status. function my_gravityflowwoocommerce_payment_step_complete_status( $status ) { return 'completed'; } add_filter( 'gravityflowwoocommerce_payment_step_complete_status', 'my_gravityflowwoocommerce_payment_step_complete_status' ); // allow multiple statuses. function my_gravityflowwoocommerce_payment_step_complete_statuses( $status ) { return array( 'completed', 'processing' ); } add_filter( 'gravityflowwoocommerce_payment_step_complete_status', 'my_gravityflowwoocommerce_payment_step_complete_statuses' );
Sample Forms
The following zip file contains three separate sample forms:
- Pay Later Workflow
- Capture & Cancel Payments
- Refund Workflow
Installations instructions: download and unzip the file containing the 3 forms. Import each of the forms into Gravity Forms from the Forms->Import/Export page. After importing, you'll need to set the assignees to the correct user on your system. Open the form settings->Workflow tab, edit the Approval step and select the user in the "Assign To" setting.