WooCommerce

Post your WooCommerce products to social media through FoPost when they publish, go on sale, or come back in stock.

FoPost for WooCommerce is a WordPress plugin that watches your shop and hands the moments worth announcing to FoPost, which delivers them to your connected accounts. A product event queues a job on Action Scheduler, the queue WooCommerce already runs, so publishing a product never waits on a network call and a failed delivery is retried.

Needs WordPress 6.0 or newer, WooCommerce 8.0 or newer, and PHP 8.1 or newer.

This is a 0.x release. Settings and filters are still settling and a minor version may change them.

Source and issues: github.com/fopost/fopost-woocommerce. GPL-2.0-or-later, because WordPress.org requires a GPL-compatible license for hosted plugins.

Install

The plugin is not on WordPress.org yet: the listing is created by a one-time manual review, and that submission is still pending. Until it lands, install the release zip:

  1. Download the zip attached to the latest release. It already contains the production dependencies.
  2. In WordPress admin, go to Plugins → Add New → Upload Plugin and upload it.
  3. Activate it. WooCommerce must be active first.

Configure

WooCommerce → Settings → FoPost

  1. Paste a FoPost API key, created at Settings → API Keys in the dashboard. It is stored on your site and is only ever sent to FoPost.
  2. Pick the workspace and the connected accounts product posts should go to.
  3. In Triggers and Messages, switch on the events you want and edit their copy.

The key is never rendered back into the settings form. Leave the field blank to keep the key you already saved, or tick Remove the stored API key to clear it.

Triggers

Each trigger is off by default, has its own message template, and is switched independently.

TriggerFires when
Product publishedA product moves into the published status for the first time
Product goes on saleA price change puts the product on sale, and it was not before
Product back in stockStock status returns to instock after being out

Every product also gets a FoPost box on its edit screen: opt that one out entirely, write a message just for it, or press Post Now.

Message placeholders

Write the copy once and let each product fill it in.

PlaceholderValue
{product_name}The product title
{price}The regular price, formatted in your shop's currency
{sale_price}The sale price, when there is one
{permalink}The product URL
{short_description}The short description as plain text, trimmed to 280 characters
{sku}The SKU
{categories}The product categories, comma separated

Every value is reduced to plain text before it is substituted, so markup in a product description never reaches a social network. The featured image goes along with the post unless you turn that off.

Filters

FilterPurpose
fopost_wc_template_placeholdersAdd or change placeholders. Return plain text values
fopost_wc_rendered_messageChange the finished message
fopost_wc_should_postVeto a post before it is queued
fopost_wc_api_base_urlPoint a staging site at a different API
fopost_wc_api_timeoutPer-request timeout, in seconds
fopost_wc_loggedReact to a recorded delivery attempt

Activity and failures

Every attempt is recorded against the product and listed under WooCommerce → FoPost Activity with the FoPost post id. Failures also surface as an admin notice.

The call itself goes through the PHP SDK, whose transport is swapped for the WordPress HTTP API, so your host's proxy and certificate settings apply.

Next

Related documentation
  • SDKs & Integrations

    Official FoPost clients for TypeScript, Python, PHP, Ruby, Go, Rust, Java, .NET, Swift, Kotlin, Dart, and Elixir, framework integrations from Laravel to Next.js, and tooling for the CLI, CI, Terraform, and the automation platforms.

  • SDKs Overview

    Every official FoPost client, what it covers, and how to pick one.

  • TypeScript SDK

    The official TypeScript and Node.js client for the FoPost API.

  • Python SDK

    The official Python client for the FoPost API.

  • PHP SDK

    The official PHP client for the FoPost API, with no framework and no HTTP library.

  • Ruby SDK

    The official Ruby client for the FoPost API, with no runtime dependencies.

  • Go SDK

    The official Go client for the FoPost API.

  • Rust SDK

    The official Rust client for the FoPost API, async and built on reqwest.

Was this helpful?

On this page