Skip to content
All articles

Product guides

Social proof on WordPress and WooCommerce without a plugin

Install Provedly on WordPress with a single wp_footer hook, send WooCommerce orders to the Records API, and know which orders can be marked Verified.

Provedly team··6 min read

You do not need another WordPress plugin to show purchase notifications. A four-line wp_footer hook loads the Provedly script, and a second hook on woocommerce_payment_complete sends each paid order to the Records API. The one thing to understand up front is which of those orders can carry the "Verified purchase" mark, because the answer depends on how your checkout talks to Stripe.

Prefer a plugin? Provedly is now on WordPress.org. It loads the widget and bars, creates the signed WooCommerce webhook for you (so every paid order earns the Verified mark) and passes the visitor id for attribution, with no code. See Provedly is now on WordPress.org. The hand-written route below still works if you would rather not add a plugin.

Install the script with wp_footer

Add this to your child theme's functions.php. If you do not have a child theme, create one first; editing the parent theme means losing the change on the next theme update.

add_action('wp_footer', function () {
    echo '<script src="https://provedly.app/w/widget.js" data-token="pp_your_token" async defer></script>';
});

That is the whole install. The script is about 6 KB gzipped, loads asynchronously, and renders in a Shadow DOM so your theme's CSS and the widget's CSS never meet. Caching plugins are fine; the tag itself is static and the widget fetches its own config from Provedly on load.

If your host locks down functions.php, most block themes let you paste the same tag into a footer template part as a Custom HTML block. Either way, the tag should appear once per page.

Decide where it shows

Provedly's URL targeting handles the "not on the checkout page" question without PHP conditionals. In the dashboard, set the widget to "all except" and list /checkout/*, /my-account/* and /cart/. Showing a stranger's purchase to someone who is mid-payment is a distraction, not encouragement.

Device targeting lives in the same place. On narrow screens a toast competes with the add-to-cart button, so some stores show toasts on desktop only and keep the live counter on both.

Send WooCommerce orders to the Records API

WooCommerce fires woocommerce_payment_complete once an order is paid. Hook it, build the payload, and post server to server. The API key is per widget and lives in the Data tab; keep it in wp-config.php, not in the theme.

add_action('woocommerce_payment_complete', function (int $order_id) {
    $order = wc_get_order($order_id);
    if (! $order) {
        return;
    }

    $item = current($order->get_items());

    wp_remote_post('https://provedly.app/api/v1/widgets/pp_your_token/records', [
        'headers' => [
            'Authorization' => 'Bearer ' . PROVEDLY_API_KEY,
            'Content-Type'  => 'application/json',
        ],
        'body' => wp_json_encode([
            'name'         => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(),
            'city'         => $order->get_shipping_city() ?: $order->get_billing_city(),
            'state'        => $order->get_shipping_state() ?: $order->get_billing_state(),
            'country'      => $order->get_shipping_country() ?: $order->get_billing_country(),
            'product_name' => $item ? $item->get_name() : null,
            'price'        => wp_strip_all_tags($order->get_formatted_order_total()),
            'external_id'  => (string) $order->get_id(),
            'occurred_at'  => $order->get_date_paid()->format(DATE_ATOM),
        ]),
        'timeout' => 5,
    ]);
});

A few notes on the fields. country must be the two-letter ISO code, which is what WooCommerce stores anyway. external_id makes the call idempotent; if the hook fires twice for one order, the second request returns 422 and nothing duplicates. The name you send is reformatted by your name format setting before anyone sees it, so sending the full name is fine; by default the widget shows "Sarah M.".

Which orders get the Verified mark

Here is the honest part. Provedly only marks a purchase "Verified" when it arrives through a signed webhook from Stripe, Shopify or WooCommerce. WooCommerce's own order webhook, signed with a secret shared with Provedly through the WooCommerce connection, qualifies. Orders you post to the Records API from your own hook, however real, are labelled "Imported" because Provedly cannot prove they happened.

How the order reaches Provedly Label shown
Stripe webhook, checkout.session.completed, signature valid Verified purchase
Signed WooCommerce order webhook, signature valid Verified purchase
Records API from woocommerce_payment_complete Imported
CSV import of past orders Imported

Whether your WooCommerce store can use the Stripe webhook depends on your gateway. Provedly's Stripe source listens for checkout.session.completed, the event Stripe sends when a hosted Checkout Session finishes. Some WooCommerce Stripe integrations use hosted Checkout; many use on-site card fields backed by Payment Intents, which do not emit that event. Check your gateway's settings. If it produces Checkout Sessions, register https://provedly.app/api/hooks/stripe/{token} as a webhook endpoint in your Stripe dashboard and paste the whsec_ secret into the widget's Data tab; the walkthrough is in Stripe webhooks for verified purchases. If it does not, use the WooCommerce connection, or the Records API hook above and accept the Imported label. Your visitors can still click the badge and see exactly where the data came from on the public verification page.

Backfill with CSV

A new widget with no history shows nothing for the first few hours. Export last month's orders from WooCommerce (Orders, Export, or any order export tool), rename the columns to name,city,state,country,product_name,price,occurred_at, and import on the Data tab. Only name is required. Rows older than your lookback window are stored but not shown. Details in Importing past orders from CSV.

Attribution

If you want the dashboard to count proof-assisted orders, add the visitor id to the payload. On the checkout page, window.Provedly?.visitorId() returns it; store it in a hidden field or the session and send it as visitor in the Records API call. Attribution is visitor-id based with a 30-day window and is never estimated, so without the id the dashboard simply reports nothing rather than a guess.

Frequently asked questions

Will this slow down my WordPress site?

The tag is async defer, the bundle is about 6 KB gzipped, and the widget waits 3 seconds by default before the first toast. It does not block rendering and does not add layout shift.

Can I use a code snippets plugin instead of functions.php?

Yes. Any mechanism that outputs the tag in the footer once per page works. The point of "without a plugin" is that you do not need a dedicated social proof plugin with its own database tables and admin screens.

Why not just type in some purchases to get started?

You can. Hand-added rows show as Sample, and rows sent through CSV or the API show as Imported. Typed numbers presented as live activity are the thing regulators have started naming; the FTC's rule on fake reviews and testimonials took effect in late 2024. Labels keep you clear of that.

The Free plan covers one site, one widget and 2,000 impressions a month, with verified purchases included: see plans.

wordpresswoocommerceinstallation

Get new articles by email

Honest social proof, verified purchases and what actually moves conversion. A few emails a month at most; leave with one click.

We email you once to confirm. Your address is used only for this newsletter; see the privacy policy.

Show proof you can stand behind.

Free plan, one site, 2,000 impressions a month, verified purchases included. The badge on the free plan links to your verification page, which is the point.