/snipcart-wordpress-plugin

Wordpress plugin that adds Snipcart product post type and settings.

Primary LanguagePHPMIT LicenseMIT

This repository is deprecated and not maintained anymore. Please take a look at this blog post to know why.

We also suggest reading this Scotch.io blog post to achieve a full, solid integration of Snipcart within WordPress.

Snipcart Wordpress Plugin

This plugin adds a new post Product type (like Post and Page) and a setting page.

The Product type contains additional fields used by Snipcart, like the price and product ID. Also, the title is used as the name of the product and the featured image as the product image.

The setting page is where you set you API key. You can also decide if you use shipping or not.

On the public side, the plugin adds an Add to Cart button.

Installation

Download the plugin from http://wordpress.org/plugins/snipcart/.

Copy the folder snipcart contained in the zip file into the wp-content/plugins folder. In the admin, go to the Plugins section. You should see Snipcart there. Click Activate.

You should now have a new Product type in the left column, near Posts and Pages. Also, you should have a new page in Settings named Snipcart.

Integration in themes

The actual type that is added for a product is snipcart_product.

Development

This section is for developers who contribute to this plugin.

Locales

When editing PHP files, you have to regenerate the POT file.

./utils/generate-pot-file.sh

When the POT file has been generated, you can merge with existing PO files.

./utils/merge-po-file.sh fr_FR

When all the PO files are ready, you can generate the MO files.

./utils/generate-mo-files.sh

Building the zip to distribute

This will generate the MO files, then zip the plugin into snipcart-wordpress-plugin.zip.

./utils/build.sh