Linux 软件免费装
Banner图

PlugUpp Live Pricing for Freemius

开发者 plugupp
更新时间 2026年9月27日 22:11
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcode block pricing currency freemius

下载

1.4.0 1.5.0 1.0.4 1.0.5 1.1.0 1.2.0 1.3.0

详情介绍:

If you sell through Freemius, the prices on your website are a copy of the prices in your Freemius dashboard, and copies go stale. Change a price in the dashboard and you then have to remember every page, tile and sentence on your own site that quotes it, open each one in the editor, retype the figure and save. Miss one and a visitor is reading a price you no longer charge. This plugin keeps the figure in the page bound to the price in the dashboard. Blocks in the editor, shortcodes everywhere else, both rendering the same live figure. Prices are fetched from the Freemius API on your server, stored on your site, and refetched within seconds of a dashboard change. Your pages render the stored figure, so nothing about this makes a visitor wait on an API call, and nobody has to re-save a page for a new price to appear. A figure typed into a page is correct on the day and drifts from then on. This plugin never types one: every price on the page is read from the stored copy at render time, and the stored copy follows the dashboard. Freemius is a trademark of Freemius, Inc. This plugin is an independent integration built by PlugUpp on the public Freemius API; it is not affiliated with, endorsed by or maintained by Freemius, and it is not the Freemius for WordPress plugin. What it does Who it is for Anyone selling a WordPress plugin or theme through Freemius who publishes prices on their own site: a pricing page, a comparison table, a landing page, or a price quoted in a paragraph of copy. It is most useful if you sell in more than one currency, or change prices more than once a year.

安装:

  1. Install the plugin through Plugins, Add New, or upload the plugin folder to wp-content/plugins/, then activate it.
  2. Open Freemius Pricing in the WordPress admin menu. It lands on Products.
  3. Press Add product and fill in the numeric Freemius product ID and its API Bearer Authorization Token, from the Freemius dashboard under the product, then Settings, then Keys. Nothing else is typed: the product's name arrives with the prices, and the product secret key, which signs webhooks, is read with the token. Both the token and the secret come from the Freemius dashboard, under the product, then Settings, then Keys.
  4. Press Test token to check it, then Add product to save.
  5. You are now on the product's own screen, and the webhook is already registered with Freemius: the save did it, and the Status card says so. If it could not be, the same line says why, and Show webhook URL beneath it opens the URL and the events to paste into the Freemius dashboard, under the product, then Webhooks, then Listeners, yourself.
  6. The same screen has a Shortcode builder: pick the element, the plan, the licence tier and the billing cycle, and it writes the shortcode and says what it renders. Copy it into a page. In the block editor, insert any of the nine Freemius blocks from the inserter under Widgets instead, or drop in the Freemius pricing card from the Patterns tab, and pick the row from dropdowns.
  7. Freemius Pricing, then Settings holds the site-wide choices: under Display the default currency, whether a visitor's currency choice is remembered, hosted or overlay checkout and how stale prices may get before a background refresh; under Billing cycle the default cycle, the three toggle labels and the three texts that can follow a price; under Buttons the default label, CSS classes and hover effect. Freemius Pricing, then Logs shows what the plugin has been doing.

屏幕截图:

  • A product's own screen: the API Bearer Authorization Token with its Test button, the Status card showing the stored prices, the latest release and the money-back period Freemius holds, and the self-registered webhook, and the Shortcode builder, here writing a whole pricing card as the six lines a page builder's shortcode widget takes.
  • The Appearance tab: how every toggle, pricing card and buy button looks, in one panel of Toggles, Cards, Buttons, Filled buttons and Outlined buttons, with the Card defaults every pricing card starts from, the hover lift, hover shadow and shadow colour for cards and for buy buttons, and for each kind of buy button a Border width and a Colours grid of Normal beside On hover. Every field that can be left empty says Unchanged. Both toggles, a live card and both buttons sit beside the fields and follow every change, with a Hold hover switch for picking a hover colour without holding the mouse still.
  • The Featured plan tab: how a featured card, its badge and its button look, with a live card beside the fields that follows every change.
  • The Freemius pricing card in the block editor, with its own width, border, radius, padding and block spacing panels, on a theme that leaves WordPress's appearance tools off.
  • A pricing row on a page: live prices, a billing cycle toggle carrying the saving computed from those prices, and the featured plan marking itself with its badge.
  • The same cards in a visitor's own currency, swapped in their browser with no request back to the site.
  • The Logs tab, showing every price fetch, webhook delivery and error, with the log level, Clear log and Download log.

常见问题:

Does this slow my pages down?

No. Pages read the prices from your own database, and your server never calls Freemius while a visitor is waiting. A stale copy renders as it is and schedules a background refresh.

How quickly does a price change appear?

With the webhook registered, within seconds. Without it, within the Refresh after interval on the Settings screen, which starts at 15 minutes, and at worst within a day on a page nobody visits.

What happens if Freemius is down, or my token stops working?

The last prices fetched stay on your pages indefinitely, and an admin notice tells you the refresh is failing. Nothing goes blank and nothing invents a figure.

Do I have to set up the webhook?

No. Saving a product with a working token registers it with Freemius for you, and every later save checks it. Where Freemius has not enabled webhooks for a product yet (it reserves them until a product is actively selling), the save is still complete and the Status card says so rather than blaming the token; every later save tries again.

Do I need Freemius's own WordPress plugin as well?

No. This plugin talks to the Freemius API directly and depends on no other plugin. The two run side by side happily. The only thing this one does to the rest of your page is add the visitor's currency to links pointing at the Freemius checkout, whoever made them, and open them in the overlay if you have chosen it.

Where do I get the API Bearer Authorization Token, and is it safe?

In the Freemius dashboard: the product, then Settings, then Keys. It is stored in your site's settings, shown masked, never written to the log, and sent nowhere but api.freemius.com over HTTPS from your server. The product secret key, which proves a webhook genuine, is read with it, so there is nothing else to copy.

Which currencies are supported?

The ones the Freemius pricing API returns: USD, EUR and GBP. The plugin never converts a price, so a currency a plan has no row in is never offered for it, and the currency toggle does not render at all where there is only one.

Do I have to write out every attribute?

No. Every attribute on every shortcode is optional, and the shortest form is the right one: [pflp_price] renders your headline price and [pflp_button] links to the checkout that sells it. Left out, plan means the plan Freemius marks as featured, licenses means that plan's lowest numbered tier, and cycle means your default cycle where the tier sells it. An attribute you do write is never second-guessed.

Can I show prices for more than one product?

Yes. Add each one under Freemius Pricing, Products, then name one with product="12345", or with its Freemius slug or name. The first product configured is used when a shortcode names none.

The product was renamed in Freemius. When does the site follow?

The name comes with the prices on every fetch, and Freemius sends no webhook for a rename, so it follows on the next refresh, or straight away if you press Refresh now or save the product.

What about the free plan?

Nothing from this plugin: a plan with no price has no figure to show and no checkout to link to, so the block's Plan dropdown does not offer it and a shortcode naming it renders nothing. For the free tier of a pricing table, use an ordinary button, the core Buttons block or your theme's, linking to the plugin's download page. That link is a fixed fact rather than a live price, so there is nothing to keep current.

Are there blocks, or only shortcodes?

Both, and they are the same code, so they can never disagree. Nine blocks under Widgets in the inserter (Freemius pricing card, price, buy button, plan text, plan features, currency toggle, billing cycle toggle, release and money-back), and the pricing card again under Freemius in the Patterns tab, ready sized and bordered. Each block renders your headline row as soon as it is inserted, and its dropdowns offer only the combinations your product sells. A Shortcode block converts to the matching block in one click, and the block type menu converts it back; styling set in the editor's own panels is inline CSS and cannot travel to a shortcode, which the editor says once.

Does it work with a page cache?

Yes, and it is built for it. Every price is written into the page in all of its currencies and all of its billing cycles, and both swaps happen in the visitor's own browser with no request back to your server, so a cached page is the same page for everyone.

Does it replace my buy buttons?

Only if you want it to. [pflp_button] renders one for any plan, licence tier and billing cycle, with four widths, two kinds of button, Filled and Outlined, and the wp-element-button class WordPress gives its own buttons. A button you built yourself works just as well: the plugin adds the visitor's currency to any link pointing at the Freemius checkout, and can open it in an overlay.

Can it show the current version and the money-back guarantee?

Yes. The Freemius release block, or [pflp_release], shows the latest version released on Freemius, what it requires and what it is tested up to, and the Freemius money-back block, or [pflp_moneyback], shows the guarantee set in the dashboard, named after its refund policy. Both update when you release or change them, the same way prices do. A product with no releases on Freemius, such as an app, shows no release line at all, and a product with no money-back period shows no guarantee: there is no typed fallback, because a typed version is the copy that goes stale.

What happens if a plan does not sell the billing cycle on show?

The price says so, "Yearly only", built from the cycles that tier does sell in your own words for them, and the buy button keeps its shape and says the same rather than linking to a checkout that cannot sell it. It never falls back to a nearby figure and never prints a zero. missing="hide" prints nothing instead, and cycle="annual" pins a card to its own figure so a toggle leaves it alone.

What external services does this plugin use?

The Freemius platform. Your server reads your prices from https://api.freemius.com/v1/products/{product ID}/pricing.json, with the money-back period in the same answer, and the latest release from .../tags/latest.json, sending the product ID and your API Bearer Authorization Token and nothing else, and only when you refresh, test a token, receive a webhook or a scheduled refresh runs. The visitor's browser calls https://checkout.freemius.com/geo.json to work out which currency to show, sending nothing beyond the request itself, and caching the answer for an hour. If you turn on overlay checkout, the visitor's browser also loads the checkout script from https://checkout.freemius.com/js/v1/; with the default hosted checkout it does not. Webhooks run the other way, inbound from Freemius to your site, and each one is verified by both a generated URL key and a body signature. Nothing about your visitors is ever sent to Freemius by your server. Freemius terms: https://freemius.com/terms/ . Freemius privacy policy: https://freemius.com/privacy/ .

更新日志:

1.5.0 1.4.0 1.3.0