
外掛標籤
開發者團隊
② 後台搜尋「PlugUpp Live Pricing for Freemius」→ 直接安裝(推薦)
原文外掛簡介
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
A Freemius price block renders any plan, licence tier and billing cycle, picked from dropdowns that offer only the combinations your product sells. There is a Freemius buy button block and a Freemius currency toggle block beside it, all three under Widgets in the inserter.
[pflp_price] does the same thing as a shortcode, for page builders, the classic editor, widget areas and template files. The blocks and the shortcodes are the same code, so the two can never drift apart, and an existing shortcode converts to a block in one click.
[pflp_button] renders a buy button linking to the hosted checkout for that same row, carrying the wp-element-button class WordPress gives its own buttons.
[pflp_currency] renders a currency toggle, and renders nothing at all when a product is sold in a single currency.
Every attribute is optional. [pflp_price] and [pflp_button] with nothing at all render your headline price and the checkout that sells it, so the shortest thing you can type is already the right one.
A webhook receiver refetches within seconds of a price or plan change in the dashboard. A staleness check is the backstop, and a daily job is the backstop for that.
Every price carries all of its currencies, so a visitor sees theirs through a swap in their own browser. No request comes back to your site, which means a page cache or a CDN can never serve one visitor’s currency to another.
Buy buttons stay ordinary links to the hosted checkout and gain the visitor’s currency, whether the plugin rendered them or your theme did. One setting opens the checkout in an overlay instead.
If the Freemius API is ever unreachable, the last good prices stay on the page and an admin notice tells you. Nothing goes blank, and no figure is ever invented or shown as zero.
Every product’s plans and pricing rows are listed in the admin, with a ready-made price shortcode and button shortcode on each line to copy into a page.
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.
About PlugUpp
PlugUpp builds WordPress plugins for people who publish and sell on their own site. This one is free because everyone who needs it is a plugin or theme seller with a marketing site, which is exactly who PlugUpp builds for. Three more for the same site:
PlugUpp Link & Image Health Audit finds the broken links and broken images on the site you sell from, checked on your own server with no external crawler and no quota. See it on plugupp.com
PlugUpp Search & Social Appearance Audit shows how every page looks in Google and on social platforms, from the page as it actually ships, before a buyer sees it. See it on plugupp.com
PlugUpp Dynamic OG Image Generator gives each page a real browser screenshot of itself as its share image, so a shared link shows the page as it is. See it on plugupp.com
External services
This plugin relies on the Freemius platform. Three separate calls are involved, and they are described here in full, followed by one call to WordPress.org on two admin screens.
1. Reading your prices from the Freemius API
Your server requests https://api.freemius.com/v1/products/{product ID}/pricing.json. It sends the numeric Freemius product ID in the URL and your Freemius API Bearer Authorization Token in an authorization header. Nothing else is sent, and nothing about your visitors is sent. The call happens only on your server, never during a visitor’s page view: when you press Refresh now or Test token in the admin, when a webhook arrives, when a scheduled refresh runs, and whenever you save the product. If no token is configured, the call is never made.
When a save has proved the token, your server also reads the product’s secret key from https://api.freemius.com/v1/products/{product ID}.json (it signs every webhook delivery; it is stored on your site and never shown or logged) and registers this site’s webhook with the same API: it lists the product’s webhooks at https://api.freemius.com/v1/products/{product ID}/webhooks.json, then creates one for this site or brings its own up to date, and removes its own when you delete the product. The only thing sent is this site’s webhook URL and the six event types it subscribes to. Webhooks pointing anywhere else are never touched.
2. Choosing the visitor’s currency
The visitor’s browser requests https://checkout.freemius.com/geo.json. The request carries nothing beyond the request itself, which necessarily includes the visitor’s IP address as any web request does. The answer is a currency code, which the browser keeps for one hour so the call is not repeated on every page. This happens only on pages where a price or a currency toggle has been rendered, and only when the visitor has not already chosen a currency.
3. The overlay checkout
When you switch the Checkout setting to “Open the checkout in an overlay”, the visitor’s browser loads the Freemius checkout script from https://checkout.freemius.com/js/v1/ so the checkout can open in place. With the default hosted setting, this script is never loaded and your buy buttons remain ordinary links.
4. The More from PlugUpp panel
On this plugin’s own Products and Settings screens, and nowhere else, your site asks the WordPress.org plugins API (https://api.wordpress.org/plugins/info/1.2/) for the list of plugins published by the PlugUpp account, once a day, and shows them as cards with their WordPress.org icons (served from https://ps.w.org/). The request carries the author name and nothing about your site. This is the same API WordPress itself uses for the Add New plugin screen and for update checks. If it cannot be reached, a short built-in list is shown instead.
Webhooks are inbound. A webhook is a call from Freemius to your site, not from your site to Freemius. Your site never initiates it and sends nothing. Each delivery is verified twice before it is acted on: the URL carries a key this plugin generated, and the body carries a signature checked against your product’s secret key.
Freemius is operated by Freemius, Inc. Their terms of service are at https://freemius.com/terms/ and their privacy policy is at https://freemius.com/privacy/.
