Move payment in order_review woocommerce năm 2024

Clone this repository at

Save igorbenic/0898d522e36efd136691c86132d7a131 to your computer and use it in GitHub Desktop.

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

Given my ultimate goal of trying to do as much as possible without installing heavy-weight plugins, today we’ll take a look at how to move fields around inside the billing & shipping sections.

WooCommerce: move billing/shipping checkout fields around

PHP Snippet: Move / Reorder Fields @ WooCommerce Checkout Page

WooCommerce 3.0 has added a “priority” field to each billing and shipping field. Now moving fields @ checkout is much easier!

/

  • @snippet Move / ReOrder Fields @ Checkout Page
  • @how-to Get CustomizeWoo.com FREE
  • @author Rodolfo Melogli
  • @compatible Woo 4.9.2
  • @community //businessbloomer.com/club/ */ add_filter[ 'woocommerce_default_address_fields', 'bbloomer_reorder_checkout_fields' ]; function bbloomer_reorder_checkout_fields[ $fields ] { // default priorities: // 'first_name' - 10 // 'last_name' - 20 // 'company' - 30 // 'country' - 40 // 'address_1' - 50 // 'address_2' - 60 // 'city' - 70 // 'state' - 80 // 'postcode' - 90 // e.g. move 'company' above 'first_name': // just assign priority less than 10 $fields['company']['priority'] = 8; return $fields; }

PHP Snippet: Move Email Field @ WooCommerce Checkout Page

I’ve written a full article on this feature alone: //www.businessbloomer.com/woocommerce-move-email-field-to-top-checkout/ – enjoy!

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

Orders are created when a customer completes the checkout process, and they are visible to users with Admin and Shop Manager roles only. Each order is given a unique Order ID.

Order IDs are non-sequential as they use the default WordPress ID approach. For sequential order numbers, you can use Sequential Order Numbers Pro.

An order also has a Status. Order statuses let you know how far along the order is, starting with “Pending payment” and ending with “Completed.” The following order statuses are used:

  • Pending payment — Order received, no payment initiated. Awaiting payment [unpaid].
  • Failed — Payment failed or was declined [unpaid] or requires authentication [SCA]. Note that this status may not show immediately and instead show as Pending until verified [e.g., PayPal]. Here is a helpful article for a better understanding and how to fix failed orders in WooCommerce.
  • Processing — Payment received [paid] and stock has been reduced; order is awaiting fulfillment. All product orders require processing, except those that only contain products which are both Virtual and Downloadable.
  • Completed — Order fulfilled and complete – requires no further action.
  • On hold — Awaiting payment – stock is reduced, but you need to confirm payment.
  • Cancelled — Cancelled by an admin or the customer – stock is increased, no further action required. Please note: This status does not refund the customer. An example use case: The merchant wants to cancel the order because the customer has become unresponsive and they do not know where to ship the product. The customer is not eligible for a refund in this case. To issue a refund please follow the Manage refunds documentation.
  • Refunded — Refunded by an admin – no further action required.
  • Authentication required — Awaiting action by the customer to authenticate the transaction and/or complete SCA requirements.
  • Checkout draft — Draft order created when customers start the checkout process with checkout block enabled.

This visual representation follows an order through its statuses from “Pending payment” to “Completed”, “Canceled” or “Refunded.”

More about how order statuses relate to payment gateways in the .

More about the different emails that are automatically sent at .

If you are using PayPal and orders are staying in Pending, you may have an IPN issue. See the troubleshooting section at

When a shop starts taking orders, the Orders management page begins to fill up. Go to: WooCommerce > Orders.

Each row displays several details. Some are there by default, others can be added. These are the available options:

  • Order number and customer name,
  • Date of purchase,
  • Order status,
  • Billing address,
  • Shipping address,
  • Purchase total, and
  • Actions.

To change these columns:

  • Go to: WooCommerce > Orders.
  • Select Screen Options in the top right corner.
  • Select which Columns to show.
  • Select how many Items you want to be displayed on each page.
  • Then Apply.

Filter orders by Date [month/year] or by registered customer.

  • Select the month, or search for a customer.
  • Select Filter.

Arrange orders in ascending or descending order by Order number, Date or Total by select the heading.

Note that the “Total” column does not take the refunded amount into consideration.

Click the order number and customer name to see the Single Order page, where you can also Edit order details, Update Status, and Add Notes. More details on that in .

Orders can be found using the search box at the top right of the order list. Enter an order number, customer name, or other information shown in the order list such as address. Click Search orders or tap return on your keyboard and search results will show a list of matching orders.

Order rows have a Preview “eye.”

Clicking Preview opens a Modal, containing the order number, order status, billing details, payment method, shipping details, shipping method, items ordered, and the option to change the order status.

Order Statuses are color-coded and descriptive.

  • Canceled – Grey
  • Completed – Blue
  • Failed – Red
  • On Hold – Orange
  • Pending Payment – Grey
  • Processing – Green
  • Refunded – Grey

Hovering over an order Status displays Notes made on the order.

At the end of a row are shortcut buttons to quickly mark orders as Processing or Complete.

From the Single Order page not only can you view all order data, but also edit and update.

  • Change the order status.
  • Edit order items – modify the product, prices, and taxes.
  • Stock – Reduce and restore stock for an order
  • Order Actions – Email order details to customer [handy if manually creating an order for your customers] or Regenerate download permissions
  • Modify product Meta to edit product variations by removing and adding meta
  • Apply coupons. You will need to know the coupon code to apply to the order. Coupon usage counts are tracked, and coupons can also be removed from orders. Note: the order must be unpaid for coupons to have an affect
  • Add fee. You can enter an amount or percentage to add a fee to an order. Negative fees will apportion taxes between all other items, and will not make the cart total go below zero

Viewing Order Details

The Order Details panel you can view:

  • Order number
  • Payment details
  • Order date and time
  • Order status
  • Customer details:
    • Username and email, together with a link to view their profile and other purchases the customer may have had in the past
    • Billing details
    • Shipping details

Editing Order Details

Most of the details in this section can be updated and/or changes.

  • To change the date and time, use the dropdown date selector and the quantity selectors for the time.
  • To change the status, choose the right status in the dropdown.
  • To change the customer, select the current customer and search for the new customer.

Under “Billing” and “Shipping”, several other details can be changed. In order to do so, select the pencil icon next to each of them.

  • Under “Billing”, the following things can be changed:
    • Billing address — this can also be loaded from the customer’s profile by selecting “Load billing address”
    • Email
    • Phone number
    • Payment method and details
  • Under “Shipping”, the following things can be changed:
    • Shipping address — this can also be loaded from the customer’s profile or copied from the billing address
    • Customer provided note

Once you’ve made the necessary changes, select Update to update the order.

Viewing Order Items

The next panel on the order page is the Order Items panel. This contains the product items, the shipping details, and the order summary.

  • Each product item row lists:
    • Product image
    • Product name
    • Single product Cost
    • Quantity
    • Total [Cost x Quantity, with discounts taken into consideration]
    • Taxes
  • Below that, the shipping details are displayed. This will include:
    • Shipping method
    • Boxed items
    • Total cost
    • Taxes
  • The last section contains an overview of the order costs. This section will change if an order is refunded. By default, it will include:
    • Items subtotal — cost excluding tax
    • Coupon[s] — amount deducted based on the use of coupons; the coupons used are displayed left in this section
    • Shipping — the shipping cost for the order
    • Taxes — the amount of taxes for the whole order; this will be replaced by the tax code applied to the order
    • Order total — the total of the above costs
    • Finally, below the line, an overview of what is paid and the fees taken by payment gateways

Editing or Adding Order Items

Apart from refunding, order items can not be edited, unless the order status is “Pending payment”, or “On hold.”

Product items. Select the pencil icon next to a product line to edit.

The following product items can be edited:

  • Add Meta — Add and remove meta to change product variable options.
  • Quantity — Number of items the customer is purchasing.
  • Total — Line price and line tax before pre-tax discounts.
  • Tax — Tax cost. For example, if a customer is tax-exempt you may want to remove the taxes.

Other actions. Next, you can do four actions at the bottom of this window:

  • Add item[s] — this will show you six new options:
    • Add product[s] — Add additional products to the order.
    • Add fee — Add an additional fee, such as gift wrapping.
    • Add shipping — Add a shipping cost. When you’ve done this, select the pencil icon to update the name, the method, the cost, and the tax.
    • Add tax — Add an additional tax code to every section in the order.
    • Cancel — Cancel if you do not want to make any changes.
    • Save — Save once the changes are made.
  • Once you’ve done this, you can select Recalculate if you want to automatically perform new calculations based on store settings. This can be handy if you are adding or removing products, coupons, shipping methods, etc. Note that any tax changes that you’ve manually included will be removed as the tax settings in your store will apply based on the customer address.
  • Apply coupon — If your customer forgot to add the coupon could or you want to reward the customer before they pay, selecting this option will show a modal that allows you to apply a coupon code.
  • Refund — to refund the customer. For more information about Manual and Automatic Refunds, see WooCommerce Refunds.

To add custom meta fields, use the Custom Fields metabox:

The Order Notes panel displays notes attached to the order and can be used for storing event details, such as payment results or reducing stock levels, or adding notes to the order for customers to view. Some payment gateways also add notes for debugging.

The following note types are possible:

  • Purple: System status notices, such as payment gateway details.
  • Grey: General status updates, such as status changes or private notes. Customers do not see these notes but may receive notification of them, e.g., when the status changes from processing to completed, an email may be sent [depending on your settings].
  • Blue: Notes to the customer. Customers receive notes via email but can view them by viewing an order in their My account section.

Notes can be a powerful tool for communicating with customers or other store managers. Need to add a tracking number for shipping? Is stock delayed? Add a customer note, and they are automatically notified.

To add a note,

  • Use the textarea to add the content of the note.
  • Select Private note or Note to customer in the dropdown.
  • Select Add.

To add an order:

  1. Go to: WooCommerce > Orders.
  2. Use Add order at the top of the page. The Single Order page appears.
  3. Input customer details, add line items, apply coupons, apply fees and calculate totals. These are the same as the .
  4. Set a status for the new order, e.g., If it needs to be paid, use “Pending payment.”
  5. Save.

Use the Order Actions dropdown to Email order details to the customer with payment instructions.

Orders that are “Pending payment” can be paid for through the payment link.

As the shop manager, you can find this link on the order overview:

  • If the customer is a Guest, anyone with the right link will be able to view the payment page and pay for the order.
  • If the customer is registered on your site,
    • Only this customer will be able to see the payment link once they are logged in.
    • The customer can also find the order in: My Account > Orders.

If the customer is assigned to the order, they will be asked to log in before paying:

  • If you are the store owner and wish to pay on behalf of the customer, consider using User Switching [not endorsed by Woo.com] to log in to the customer’s account and complete the payment as them.

Starting with WooCommerce 3.4+, it is possible to remove customer data.

  • Go to: WooCommerce > Settings > Accounts & Privacy.
  • Enable Allow personal data to be removed in bulk from orders.
  • Save changes.

This option is now available for orders:

  • Go to: WooCommerce > Orders.
  • Select the orders that need personal data removed.
  • Select Bulk Actions > Remove personal data.
  • Select Apply.

Please note, that once you press Apply this will remove personal data with no further warning. Orders will appear on the Orders screen like this:

On an individual order, data is updated like this:

  • Failed, pending, and canceled orders which get cleaned up will be moved to the trash.
  • Completed orders which get cleaned up will be anonymized so sales stats are unaffected [as above].
  • Inactive accounts will be deleted. An inactive account is one which has not been logged in to, or which has not placed orders, for the specified time.

Personal data removal can be automatically associated with account erasure requests. WordPress allows deleting user details upon request via Tools > Erase Personal Data. This removal can now also be associated with the orders of this user.

  • Go to: WooCommerce > Settings > Accounts & Privacy.
  • Under Account erasure requests:
    • Enable Remove personal data from orders on request, if you also want to remove order data when this is done
    • Enable Remove access to downloads on request, if the customer should no longer access the download links once their personal details have been removed.

Personal data retention can also be automated.

  • Go to: WooCommerce > Settings > Accounts & Privacy
  • Under Personal data retention, set thresholds for inactive accounts and for orders with different statuses.
  • Save changes.

If enabled, this cleanup will run via a daily cron job. Inactive accounts are tracked using metadata, and only subscribers/customer accounts are removed.

Starting with WooCommerce 3.4+ there is now a widget that appears under Dashboard that shows order information from across all sites. You can click on an order to be taken to the details of the order on that site.

StatusDescriptionPayment gateway commentsOn HoldAwaiting payment – stock is reduced, but you need to confirm paymentUsually seen with payment methods when you need to manually confirm, such as BACS [bank transfer] or cheque.

You’ll also see this when the gateway is set to authorize instead of capture a charge: the shop owner will need to manually switch the status to processing.

How do I change the order of Payments in WooCommerce?

Change order of payment methods.

Log in to your WordPress dashboard..

Navigate to 'WooCommerce' and then to 'Settings'..

Click on the 'Payments' tab..

Here you will see a list of your enabled payment methods..

To change the order, simply drag and drop the iDEAL payment method to the top of the list..

How do I change the position payment method in WooCommerce?

How to Move Payments on WooCommerce Checkout.

Hook and display the payment gateways under the Shipping address..

Remove the payment gateways from the order review WooCommerce template..

Render the payment gateways when the order review changes..

How do I change the order of billing fields in WooCommerce?

Reorder WooCommerce checkout fields from plugin options We will reorder the billing fields first. So, select the Billing option in the Checkout tab. Here, you will be able to see all the fields for the billing details. Now, all you have to do is use drag and drop to reorder the fields of the billing details.

How do I get a payment method order in WooCommerce?

If you want your customer to be able to purchase via one of the selected WooCommerce payment methods, select it in the settings panel. Go to WooCommerce > Settings > Payments then enable and configure WooCommerce payment options. Your customers will purchase your product using these methods.

Chủ Đề