Setup WooCommerce to work with Templett
First, be sure you are using the latest version of WordPress along with the latest version of WooCommerce. Also, be sure you have enabled "pretty" permalinks in Wordpress. It also helps to make sure you are using PHP 7 or later. You may need to contact your host to confirm this.
First, create API keys in WooCommerce
- Log in to your WordPress site and navigate to the wooCommerce settings page: WooCommerce > Settings
- Click the API tab at the top
- Check the box that reads: “Enable the REST API” and click Save Changes
- Click the Keys/Apps link at the top below the tabs
- Click the “Add Key” button
- Type a description for the key (Templett), set a user for the key (your user account), and give permission to Read/Write
- Click the “Generate API Key” button
Copy the Consumer key and Consumer secret in a safe place. You’ll need to enter this in Templett. Please note, you won’t be able to see these keys again once you close the page dialog box.
Setup Templett to work with WooCommerce
Now log into Templett and navigate to Admin > Settings > Integrations
- In the WooCommerce section, click the “Connect WooCommerce Shop” button
- Enter a name for your shop
- Enter the domain name of your shop (we’ll test it to see if it works)
- Paste the Consumer key in the correct field
- Paste the Consumer secret in the correct field
- Copy the Templett secret key. You’ll use it in the next step.
- Click the “Add Shop” button
We’ll test the API key and if the connection is successful, you’ll be ready for the next step.
Add Webhook in WooCommerce
The webhook allows your WooCommerce shop to tell Templett when you have a new order so we can get the details and give your customer access to their purchased templates.
Make sure you are on the WooCommerce Settings page and click the Webhooks tab at the top
- Click the “Add webhook” button
- Give the webhook a name. You can use “Templett”
- Change Status to “Active”
- Select “Order updated” in the Topic dropdown
- Set the Delivery URL to: https://templett.com/wp_woo_hooks.php
- Set the Secret to the secret key that you copied from Templett
- Set the API version to: WP REST API Integration v3
- Click the “Save Webhook” button.
Template id’s in product descriptions
Be sure to put the template id’s in the product descriptions. If you do not put the template id’s in the product description, Templett will disregard the order and your customer will not get access to their purchased templates. Please see this article for more information.
You’re all set. Create a test order in Woocommerce to make sure everything works properly. If the order isn’t pulled into Templett, go over the steps again carefully to make sure you didn’t miss anything.