HDWebmobile Buy Now Button

HDWebmobile Buy Now Button

Skip the cart with a direct Buy Now button — price and quantity are always computed server-side from the real product, never accepted from the link.

Overview

HDWebmobile Buy Now Button adds a “Buy Now” button next to Add to Cart on simple products. Clicking it clears the cart, adds exactly that one product, and takes the customer straight to checkout.

Several competing “Buy Now” / “Direct Checkout” plugins built their skip-the-cart link with the quantity — and in at least one case a price override for a “quick deal” variant — taken directly from the URL’s own query string and used verbatim when adding the item to the cart (CWE-20, Improper Input Validation). A shopper could edit that link to request an unintended quantity or otherwise manipulate the price the cart ended up charging. This plugin’s Buy Now link carries only a product id — there is no quantity or price parameter in its request handling at all: the quantity added to the cart is always the literal number 1, written directly into the code — there is no variable that could carry a different value in from a link. The price is always whatever WooCommerce’s own cart lookup finds for the real product at that moment — never a value read from the request. For a variable product, a variation id is only ever accepted if it genuinely belongs to the product it’s claimed for — never trusted on its own.

Key Features

  • A Buy Now button next to Add to Cart on every simple product
  • Clears the cart first, so checkout total always matches exactly what was clicked
  • Customizable button text

Limitations

Please read before installing:

  • Simple products only in this version — variable products need a variation chosen first
  • No quantity selector by design — always exactly one unit

Quick Setup

  1. Upload the plugin files to the /wp-content/plugins/hdwebmobile-buy-now directory, or install through the Plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress. WooCommerce must already be installed and active.
  3. Go to WooCommerce > HDWebmobile > Buy Now to customize the button text.

Latest Version

Current stable version in readme: 1.0.0 (Initial release: a direct-to-checkout Buy Now button, with quantity and price always resolved server-side.)

See our other WordPress plugins for more WooCommerce and site-utility tools.


Ready to start your project?

Share your brief and we’ll propose the right approach — a full site, a landing page, or a custom plugin.