WooCommerce: Add Content To The “Order Pay” Page

The WooCommerce “Order Pay” page is a hidden gem within the checkout process. It’s not typically encountered during a standard customer purchase journey – it comes into play when a store admin creates a manual order in the WooCommerce backend and sets it to “Pending” order status, often for scenarios like phone orders or custom quotes. WooCommerce generates a unique URL that can be shared with the customer for secure online payment.

TLDR: the “Order Pay” page serves a specific purpose โ€“ allowing customers to complete payment for manually created orders.

If you’ve seen the “Order Pay” page before, you know it only contains the order items table, and the payment form. Nothing else. So, let’s add some HTML content above the table, like a heading, some text, a banner, or whatever you may need to help the customer submit their payment asap!

PHP Snippet: Add HTML Content @ WooCommerce Order Pay Page

 * @snippet       Add Content To WooCommerce Order Pay Page
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 8
 * @community     https://businessbloomer.com/club/

add_action( 'before_woocommerce_pay_form', 'bbloomer_add_content_order_pay_page', 10, 3 );

function bbloomer_add_content_order_pay_page( $order, $order_button_text, $available_gateways ) {
   echo '<h3>This is a nice heading</h3>';
   echo '<p>This is some content with a <a href="">link</a>.</p>';
   echo '<img src="banner.jpg">';

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

  • WooCommerce: Allow to “Pay for Order” Without Login
    Some plugins such as “deposit” and “subscription” payments send customers to the “Pay for Order” page in order to complete a pending WooCommerce order. In certain cases, also, the customer is forced to log in and this really affect sales conversion rate – instead of the checkout form customers see this notice: “Please log in […]
  • WooCommerce: Enable Payment Gateway Only for “Order Pay Checkout”
    I invoice clients via WooCommerce, and then send them the “Invoice Email”, which takes them to the “Order Pay” page. Of course, I want to give them the option to pay via “Bank Transfer” (bacs), but I don’t want this to be visible on the default checkout page. We’ve seen in the past how to […]
  • WooCommerce: Display Customer Address @ Order Pay
    The WooCommerce Order Pay page URL is generated by the store admin while creating a manual order from the backend. This URL is then forwarded onto the client, where they can pay for the order and complete their purchase. The other annoying thing about the order pay page, together with strict page permissions, is the […]
  • WooCommerce: Turn Checkout Into a Quote System
    There are certainly ways and plugins to turn WooCommerce into a quote engine, but today I want to share a super simple workaround that could be helpful to many. In a nutshell, we’ll use the same WooCommerce cart/checkout flow, rename a few strings and buttons, enable an offline payment gateway (so there is no actual […]
  • WooCommerce: Deposit Payment @ Order Pay Page
    In WooCommerce, the order pay page is a specific webpage a customer lands on to complete payment for an order. It’s typically used for manual orders. When a store admin creates an order in the WooCommerce backend, the system generates a unique URL for the order pay page. This link can then be shared with […]

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

Questions? Feedback? Customization? Leave your comment now!

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *