=== WC-AC Hook === Contributors: mtreherne Tags: WooCommerce, ActiveCampaign Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=matt@sendmail.me.uk¤cy_code=GBP&item_name=Donation+for+WC-AC+Hook Requires at least: 4.1.1 Tested up to: 4.3.1 Stable tag: 1.2.1 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Integrates WooCommerce with ActiveCampaign by adding or updating a contact on ActiveCampaign with specified tags, when an order is created. == Description == Integrates WooCommerce with ActiveCampaign by adding or updating a contact on ActiveCampaign with **specified tags**, when an order is created on WooCommerce. Using the plugin means that all of your shop customers will be automatically created as contacts on ActiveCampaign. They will have their first name, last name, email and phone number taken from their billing details on their order. You must specify (in the plugin settings) on which ActiveCampaign list contacts are added or updated. You may **tag** all contacts created in this way with multiple tags e.g. you may want to track that the source is your WooCommerce shop and that an order has been created. It is also possible to add **tags based on each product item** on an order e.g. if you want to know exactly what items a customer has ordered or perhaps a type of item (by using the same tag for multiple products). This enables you to use ActiveCampaign automations (or integration with other applications) based on shop orders and products. You now have the option in settings to **track order status**. This means that contacts are created as soon as an order is created, and the suffix (pending), (failed), (processing), (on-hold), (cancelled) or (completed) will be appended to the last tags listed. The tags will be updated as the status changes. Please read the FAQs for an example to help you understand this option. If a customer already exists as a contact on ActiveCampaign their details will be updated (note that a new contact will have a status of active, but updates will retain the existing contact status for the ActiveCampaign list). A WooCommerce system status log called `wc-ac-hook*.log` can be checked for errors. == Installation == You must have WooCommerce installed (tested up to 2.4.7) and have an ActiveCampaign account to make use of this plugin. 1. For manual code install upload and extract the plugin to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. Goto settings page for this plugin from the 'Plugins' menu or the 'WooCommerce > Settings > Integration' tab then: 4. Enter your Active Campaign URL and your Active Campaign API key; 5. Enter the ActiveCampaign list ID to which contacts are added or updated; 6. Enter the default tag(s) that are added to the contact. 7. If you wish to have tags associated with each product you must enter these on each products 'Advanced Data' fields. If you deactivate the plugin all settings will be retained until you uninstall. == Frequently Asked Questions == = How do I find the ActiveCampaign list ID? = 1. Login to your ActiveCampaign account 2. Click 'Lists' from the menu 3. Click on the number of contacts by the list title 4. Look in the URL you will see listid=# = Can I track order status and abandoned carts? = You now have the option in settings to track order status. This means that contacts are created as soon as an order is created, and the suffix (pending), (failed), (processing), (on-hold), (cancelled) or (completed) will be appended to the last tags listed. The tags will be updated as the status changes. To give you an example of how this works: 1. In settings you have the following two Default Tag(s) = WC Order, WC-Last-Order 2. A product has an ActiveCampaign Tag = Purchased-Widget 3. A customer enters an order and goes to PayPal, a contact would be created on ActiveCampaign with the tags 'WC Order', 'WC-Last-Order (pending)' and 'Purchased-Widget (pending)'. 4. As the order status changes the tags with status will be removed and new tags added e.g. 'WC-Last-Order (processing)' and 'Purchased-Widget (processing)'. 5. If the order is completed you will be left with the tags 'WC Order', 'WC-Last-Order (completed)' and 'Purchased-Widget'. You could design ActiveCampaign automations to be triggered based on such tags being added. For example you may wish to be notified if any order has a status of (pending) for more than a certain period of time. Since this would indicate that a cart has been abandoned during payment; or you may want an automatic campaign to follow up with a customer if they cancelled an order. = When will a contact be created or updated on ActiveCampaign? = By default only when the order status is changed to 'Completed'. Optionally you can change the settings so that it is done when an order is created with a status of 'Processing'. Alternatively, if you have selected the track order status option, the contact will be created when an order is created whatever the status. = How do I clear the debug log? = Your site administrator can remove the file `/wp-content/uploads/wc-logs/wc-ac-hook*.log` == Screenshots == 1. Plugin settings page from 'Integration' tab on 'WooCommerce > Settings' menu 2. Advanced product data fields when editing 'Products' == Changelog == = 1.2.1 = * Fix to replace `__DIR__` with `__FILE__` to ensure compatibility with PHP 5.2 = 1.2 = * Added option to track order status using tags (see FAQs for example) = 1.1 = * Added option to add/update contact when order has status of processing = 1.0 = * Initial release. == Upgrade Notice == = 1.2 = Option to track order status using tags = 1.1 = Option to add/update contact when order status is processing or completed