FAQ
Does this slow my pages down?
No. Pages read the prices from your own database. Your server never calls Freemius while a visitor is waiting, not even when the stored prices are old: a page view schedules a background refresh and renders what it has.
How quickly does a price change appear?
With the webhook registered, within seconds. Without it, within the time set in Refresh after on Freemius Pricing, Settings, which defaults to 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 the product with a working token registers it with Freemius for you, and every later save checks it. It is what makes a change appear in seconds rather than minutes. If the Status list on the product's screen says it is not registered, Show webhook URL beneath it opens the URL and the six events to paste in by hand.
Freemius said my plan doesn't support creating webhooks. Is the token wrong?
No. The same token has just fetched your prices and your secret key, and the product is saved and live. Freemius reserves webhooks, along with some other features, for products it considers actively selling, and unlocks them after a few production sales. A product that has not reached that point gets that sentence from the API and from the dashboard alike, so there is nothing to paste by hand. The plugin says so on the product's screen (Webhook: not enabled by Freemius for this product) and marks the save as a warning rather than an error. Until Freemius enables them, the prices refresh on the interval set under Settings, and once a day regardless; every later save tries the registration again, so the webhook appears by itself once Freemius allows it.
Do I need Freemius's own WordPress plugin as well?
No. This plugin talks to the Freemius API directly and does not depend on any other plugin. The two can run side by side if you already have the official one. This plugin renders its own blocks and shortcodes; the one thing it does to the rest of the page is add the visitor's currency to any link pointing at the Freemius checkout, whoever made the button, and open that link in an overlay if you have chosen the overlay checkout. Nothing else on the page is touched.
Where do I get the API Bearer Authorization Token?
In the Freemius dashboard, open the product, then Settings, then Keys,
and copy the product's API Bearer Authorization Token. Paste it into the API Bearer Authorization Token field on
the product's own screen under Freemius Pricing, Products, press Test
token, then Add product or Save product. The plugin makes one kind of
request with it, a read of that product's plans and prices, and the token is
sent nowhere but api.freemius.com. The product secret key, which proves a
webhook really came from Freemius, is read with the token when you save, so
there is nothing else to copy. Getting started walks
through it.
Is my API Bearer Authorization Token safe?
It is stored in your site's settings, shown masked on the product's own screen,
and never written to the plugin's log. It is only ever sent to api.freemius.com,
over HTTPS, from your server.
Which currencies are supported?
The ones the Freemius pricing API returns: USD, EUR and GBP. The plugin never converts a price. If a plan has no price in a currency, that currency is not offered for it.
How does the plugin know a visitor's currency?
In this order: a currency they chose with the toggle, if you have left remembering turned on; otherwise a lookup of their location through Freemius's own endpoint, cached in their browser for an hour; otherwise your default. The lookup happens in their browser, and nothing about them reaches your server.
What if a visitor blocks that lookup?
They see your default currency and can still choose another with the toggle.
Do I have to write out every attribute?
No. Every attribute is optional. [pflp_price] on its own renders your headline
price, and [pflp_button] on its own links to the checkout that sells it: the
featured plan, its lowest licence tier, and the annual price where there is one.
Name an attribute only where you want something other than that.
Can I show one price in a fixed currency?
Yes. [pflp_price plan="pro" licenses="1" cycle="annual" currency="gbp"] always
shows GBP, and the toggle leaves it alone.
Can I show prices for more than one product?
Yes. Add each one on Freemius Pricing, Products, then name one in the
shortcode with product="12345", or with the product's Freemius slug or name,
product="my-plugin". The first product
configured is the default 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: within the refresh interval on a page somebody visits, within a day on a quiet site, or straight away when you press Refresh now or save the product on its own screen.
Why is my price not showing?
Because the plan, licence tier or cycle in the shortcode does not match a pricing row. Deliberately, nothing renders rather than a wrong figure. Copy the shortcode from the Shortcodes table on the product's own screen, which lists exactly what the API returned. See Troubleshooting.
Does it work with a page cache?
Yes. Every price is written into the page in all of its currencies, and the swap to the visitor's own currency happens in their browser, so a cached page is the same page for everyone. Only the stored prices need refreshing, and that happens on the server.
Does it replace my buy buttons?
Only if you want it to. [pflp_button] renders one for any plan, licence tier
and billing cycle, carrying the same wp-element-button class WordPress gives
its own buttons, so in most block themes it already matches. A button you built
yourself works just as well: the plugin adds the visitor's currency to any link
that points at the Freemius checkout, and can open that checkout in an overlay
if you prefer.
Can I change what the button says?
Yes. label="Get it now" changes one button, and Freemius Pricing, Settings
holds the words every button uses when it carries no label of its own. The same
screen holds extra CSS classes for every button, and class="..." adds more to
a single one.
What external services does this plugin use?
The Freemius platform, in three ways. Your server reads your prices from the
Freemius API, 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 asks checkout.freemius.com which currency to
show, sending nothing beyond the request itself, and keeps the answer for an
hour. If you turn on the overlay checkout, the visitor's browser also loads
the Freemius checkout script; with the default hosted checkout it does not.
Webhooks run the other way, inbound from Freemius to your site, and each one is
checked against both the key in its URL and the signature on its body. Nothing
about your visitors is ever sent to Freemius by your server. Freemius's terms
are at https://freemius.com/terms/ and its privacy policy at
https://freemius.com/privacy/.
Are there blocks, or only shortcodes?
Both, and they are the same thing. In the block editor, look under Widgets in the inserter for Freemius price, Freemius buy button and Freemius currency toggle. Each one renders your headline row as soon as it is inserted, and the sidebar fills its Plan, Licences and Billing cycle dropdowns from the rows your product actually sells, so an impossible combination cannot be chosen. Nothing is written into the post: the page renders through exactly the same code the shortcode of the same name uses, which is why a price in a block and a price in a shortcode can never disagree. The shortcodes are not going anywhere; they are what a page builder, the classic editor, a widget area or a template file wants. See Blocks.
Can I turn a block back into a shortcode?
Yes. Select the block, open the block type button at the left of its toolbar
and choose Shortcode. You get an ordinary Shortcode block holding the
equivalent shortcode, and anything left at its default is left out, so a block
nobody configured becomes a plain [pflp_price]. One thing does not survive
the trip: styling set in the colour, typography and spacing panels is inline
CSS on the block, and a shortcode has nowhere to carry it. The editor says so
once, the first time you convert a styled block. Anything you picked from a
preset does survive, because a preset is a class name your theme already
defines, and those class names are added to the shortcode's class. The
conversion runs the other way too: a Shortcode block holding any of the three
shortcodes offers to become the matching block. See
Converting a block to a shortcode.
Can I style the buy button in the editor?
Yes. The buy button block carries the WordPress colour, typography,
spacing and border panels, and the price and the toggle carry colour
and typography. Underneath, the button still leads with wp-element-button,
the class WordPress gives its own buttons, so in most block themes it already
matches before you change a thing. Additional CSS class(es) in the
Advanced panel is the block spelling of the shortcode's class attribute,
which all three take, and classes are added to the ones the price, button or
toggle already carries rather than replacing them.
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 (its WordPress.org listing, usually). That link is a fixed fact rather than a live price, so there is nothing to keep current. See Blocks.
How do I add a buy button?
Insert the Freemius buy button block, or write [pflp_button], which
takes the same plan, licences and cycle attributes as a price. It is an
ordinary link to your Freemius hosted checkout carrying the wp-element-button
class, so in most block themes it already matches the rest of your site.
label sets the words on one button and Freemius Pricing, Settings sets
the words on all of them; class adds CSS classes on all three shortcodes and
id an HTML id on the button; and align="center" puts it in a block of its
own and moves it across the line, which all three shortcodes take and all
three blocks offer in the block toolbar. A button you built yourself still
works: the plugin adds the visitor's currency to any link pointing at the
Freemius checkout. See Shortcodes.