WordPress plugin intelligence profile

HDWebmobile Formula Pricing

Price a product from customer-entered numbers using a formula -- evaluated safely, never with PHP's eval().

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.0.0
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.9 · PHP 7.4
Directory statusactive
Last directory update14 Oct 202619d ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records HDWebmobile Formula Pricing version 1.0.0 as active, updated 19d ago and tested up to WordPress 7.1.

Overview

About this plugin

g. 05 for a custom-cut material priced by area). This is a common real need for stores selling custom-sized fabric, framed prints, engraved items, or anything priced by dimension or quantity, not just a flat number.

Security by design

The simplest way to implement formula-based pricing — passing the merchant’s formula text straight into PHP’s eval() at calculation time — is also the most dangerous: it turns any formula input into a remote code execution path. This plugin closes that entire vulnerability class by construction:

  • The formula is tokenized character-by-character into a strict set of allowed pieces: numbers, your own configured field names, and the four arithmetic operators plus parentheses. Anything else in the formula text — any other letter sequence, any function-call-looking pattern, any special character — causes the formula to be rejected outright when you save it.
  • The token stream is evaluated by a small hand-written arithmetic parser. There is no eval(), no create_function(), no dynamic function dispatch of any kind anywhere in this plugin — the only operations that can ever run are addition, subtraction, multiplication, and division of plain numbers.
  • The customer-facing live price preview also never exposes your formula to the browser: it’s computed by an AJAX call back to your own server, through the exact same safe evaluator used at checkout, so the formula text itself is never sent to a visitor’s browser.
  • The real price used at checkout is always recomputed server-side from the product’s own stored fields and formula — never trusted from what the browser submitted.

Key Features

  • Add up to 6 numeric input fields per product (label, variable name, min/max bounds, default value)
  • Write a formula referencing those fields by name — validated for safety the moment you save it
  • Live price preview on the product page as the customer types, computed server-side
  • Optional minimum/maximum price clamps, so no combination of inputs can produce an unreasonable price
  • Every field’s min/max bounds are enforced again server-side at add-to-cart time, not just in the browser
  • Field values show on the cart, checkout, and order screens exactly as entered

Limitations (please read before installing)

  • Simple products only in this version — no variable-product support
  • Formulas support only +, -, *, /, and parentheses (no exponents, square roots, or conditional logic) — deliberately, since a richer grammar is a larger safety surface to get right
  • No formula “test” button in the admin beyond the save-time validation — if a formula is rejected, the error message names exactly what’s wrong (an unknown variable, a bad character, division by zero with the values you tried)
  • Requires a Regular Price to be set on the product (even a nominal placeholder) — this is standard WooCommerce behavior for any product with no price at all, not something this plugin can work around

Enjoying this plugin?

org — it helps other WordPress users find it. Found a problem or have an idea? Please open a support topic first so it can be fixed.

How to Use

1. Add your input fields

g. “Width in cm” with variable name width ). Set a minimum, an optional maximum, and a default value for each.

2. Write the formula

g. 05. Save the product — if the formula uses anything other than your field names, numbers, and + - * / ( ), you’ll see exactly what’s wrong and the formula won’t be saved until it’s fixed.

3. What the customer sees

The product page shows your input fields above the Add to Cart button, with a live estimated price that updates as they type. The real price is confirmed the moment the product is actually added to the cart.

4. Keeping prices sane

Set an optional minimum and/or maximum price on the same tab — no matter what a customer enters (within their allowed field ranges), the final price is clamped to stay within those bounds.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • custom pricing
  • dynamic pricing
  • calculator
  • formula
  • woocommerce
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.9 · PHP 7.4
Update activity14 Oct 202619d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.