A native integration which allows you to market your store on Pinterest, including:
- Sync your WooCommerce products to Pinterest.
- Allow your visitors to save products to their Pinterest boards.
- Make your products and posts show up as Rich Pins on Pinterest.
- Track conversions with Pinterest tag.
Pinterest for WooCommerce is under development. To find out more about availability and release, refer to WooCommerce.com.
This repository is not suitable for support. Please don't use our issue tracker for support requests.
Pinterest for WooCommerce requires recent versions of PHP (7.3 or newer), and WordPress and WooCommerce (we recommend the latest, and support the last two versions, a.k.a. L-2).
See pinterest-for-woocommerce.php for current required versions.
As per WordPress Core Handbook we currently support:
- Last 1 Android versions.
- Last 1 ChromeAndroid versions.
- Last 2 Chrome versions.
- Last 2 Firefox versions.
- Last 2 Safari versions.
- Last 2 iOS versions.
- Last 2 Edge versions.
- Last 2 Opera versions.
- Browsers with > 1% usage based on can I use browser usage table
After cloning the repo. Remember to use the appropriate node version
nvm useto autoselect the node version based on.nvmrcfile.
Then, install dependencies:
npm installto install JavaScript dependencies.composer installto gather PHP dependencies.
Now you can build the plugin using one of these commands:
npm start: Build a development version and watch files for changes.npm build: Build a production version.npm build:zip: Build and production version and package as a zip file.
developbranch is the most up-to-date code.
There are a number of development tools available as npm scripts. Check the package.json file for more.
npm run lint:js: Runeslintto validate JavaScript code style.npm run lint:css: Runstylelintto validate CSS code style.npm run lint:php: Runphpcsto validate PHP code style.
Please use these tools to ensure your code changes are consistent with the rest of the code base. This code follows WooCommerce and WordPress standards.
This repository includes an EditorConfig to automate basic code formatting. Please install the appropriate plugin for your editor.
Install composer, git, svn, and either wget or curl.
Change to the plugin root directory and type:
$ composer installTo run the unit tests you need WordPress, WooCommerce, and the WordPress Unit Test lib (included in the core development repository).
Install them using the install-wp-tests.sh script:
$ ./bin/install-wp-tests.sh <db-name> <db-user> <db-pass> <db-host>Example:
$ ./bin/install-wp-tests.sh wordpress_tests root root localhostThis script installs the test dependencies into your system's temporary directory and also creates a test database.
You can also specify the path to their directories by setting the following environment variables:
WP_TESTS_DIR: WordPress Unit Test lib directoryWP_CORE_DIR: WordPress core directoryWC_DIR: WooCommerce directory
npm run test:php:wp-env runs the PHPUnit suite inside @wordpress/env's tests-cli container. Compared to ./bin/install-wp-tests.sh, this path needs no host MySQL or svn, and wp-env scopes its containers by working-directory hash so concurrent runs from separate worktrees stay isolated.
- Docker (Docker Desktop on macOS/Windows is enough).
- A local development checkout of WooCommerce. The plugin's
tests/bootstrap.phprequires WooCommerce'stests/legacy/bootstrap.php, which ships only in the WooCommerce source repo — not in the WordPress.org zip the base.wp-env.jsondownloads.
Create .wp-env.override.json alongside .wp-env.json to swap the base WooCommerce zip for your local checkout (adjust the path to wherever you cloned WooCommerce):
{
"plugins": ["../woocommerce/plugins/woocommerce", "."]
}plugins in the override file replaces the base list, so include both WooCommerce and . (this plugin). If vendor/ is missing inside your WooCommerce checkout, run composer install in that directory before starting wp-env.
npx wp-env start # ~30–90s first run, faster afterwards
npm run test:php:wp-env # run the full PHPUnit suite
npm run test:php:wp-env -- --filter ProductSyncTest --testsuite=unit
npx wp-env stop # tear down when finishedAnything after -- is forwarded to phpunit, so PHPUnit flags such as --filter, --testsuite, and --group work as usual.
Change to the plugin root directory and type:
$ vendor/bin/phpunitThe tests will execute, and you'll be presented with a summary.
Made with 💜 by WooCommerce.
We're hiring! Come work with us!