=== CartBounty - Save and recover abandoned carts for WooCommerce ===
Donate link: https://www.cartbounty.com
Contributors: streamlinestar, nauriskolats
Tags: woocommerce, abandoned carts, cart abandonment, exit popup, activecampaign
Requires at least: 4.6
Tested up to: 6.9
Requires PHP: 7.0
Stable tag: 8.10
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Save abandoned carts and send automated abandoned cart recovery messages. Get more leads, reduce cart abandonment, and increase sales.

== Description ==

All online stores suffer from shopping cart abandonment. [CartBounty](https://www.cartbounty.com) helps to save abandoned carts in WooCommerce and send effective abandoned cart reminder messages to recover lost sales.

* View shopping carts in real-time
* Save abandoned carts
* Automate abandoned cart recovery
* Get more leads and reduce cart abandonment
* Actions and filters for advanced configuration
* Fully compliant with GDPR

With thoughtful user experience, built-in efficiency tools and ability to integrate with other systems, CartBounty is a powerful addition to your marketing arsenal.

[youtube https://youtu.be/tayOOmSOcsk]

## Live shopping cart monitoring and reports

CartBounty saves and displays all shopping cart activity from the moment a product is added to the cart.

* Detailed [abandoned cart reports](https://www.cartbounty.com/abandoned-cart-reports-and-analytics-for-woocommerce)
* Discover the top most abandoned products
* View shopping cart abandonment data by country
* View anonymous carts
* Get notified about newly abandoned carts
* Export abandoned carts (**Pro**)
* Prevent bots from leaving abandoned carts using Google reCAPTCHA (**Pro**)
* Magic login to automatically sign in registered customers when they open their recovery link for faster checkout and improved UX (**Pro**)

## Automate abandoned cart recovery

Save your time with automated abandoned cart recovery and focus your energy on the important stuff.

* Send abandoned cart reminders using WordPress mail server
* Send abandoned cart email series using [ActiveCampaign](https://try.activecampaign.com/start), [GetResponse](https://www.getresponse.com/?a=vPJGRchyVX&c=cartbounty_readme) and [MailChimp](http://eepurl.com/hHjfrX) (**Pro**)
* Use [web push notifications](https://www.cartbounty.com/web-push-notifications-abandoned-cart-recovery/) to send low-friction, real-time, personal and efficient reminders that don't require an email or a phone number (**Pro**)
* Use [WhatsApp](https://www.cartbounty.com/whatsapp-abandoned-cart-recovery-reminders) to send highly engaging abandoned cart reminder messages (**Pro**)
* Send SMS text message reminders using [BulkGate](https://portal.bulkgate.com/join/55713) (**Pro**)
* Use webhook to send abandoned cart data and create powerful automations in apps like [Make (former Integromat)](https://www.make.com/en?pc=cartbounty), [Pabbly](https://payments.pabbly.com/api/affurl/RVYZ07kQyUZ0Z1HUKZ1m/xciq3ahCAzNG3CSo?target=9Z2AHyhSldo6KI1Fn), Zapier or similar (**Pro**)
* [Personalize messages](https://www.cartbounty.com/personalization-tags/) with dynamic content (**Pro**)
* Generate and send unique coupon codes (**Pro**)
* Track message open, click-through, recovery and unsubscribe rates (**Pro**)
* Recover unfinished orders (**Pro**)
* Restore Custom product fields (Product addons) and WooCommerce Product Bundles (**Pro**)
* Exclude carts from abandoned cart recovery based on specific products or product categories, countries, languages, IP addresses, and other criteria (**Pro**)
* Pause / Resume / Restart individual abandoned cart recovery (**Pro**)
* Translate emails, push notifications, WhatsApp and SMS text messages using [WPML](https://wpml.org/?aid=447227&affiliate_key=0a2ZxRioMm8S), Loco translate and GTranslate plugins (**Pro**)

## Get more leads and reduce cart abandonment

Use CartBounty efficiency tools to increase your chances of getting more recoverable abandoned carts.

* Reduce checkout abandonment with built-in "Remember checkout fields" feature which allows store customers to refresh the checkout page after entering their information and walk around the page without losing previously entered data
* Use [Exit Intent popup](https://www.cartbounty.com/exit-intent-popup-technology "Exit Intent popup technology") to minimize cart abandonment and increase sales
* Save contact details from 3rd party plugins and [custom email and phone fields](https://www.cartbounty.com/actions-and-filters/#save-abandoned-cart-email-from-a-custom-input-field)
* Gather user's contact details right after "Add to cart" button is clicked using [Early capture](https://www.cartbounty.com/early-capture-add-to-cart-popup "Early capture popup") (**Pro**)
* Provide [Instant coupon codes](https://www.cartbounty.com/exit-intent-popup-technology/#enable-instant-coupons) to motivate customers to complete their purchase using Exit Intent and Early capture tools (**Pro**)
* Decrease shopping cart abandonment by grabbing customer attention and returning them to your store after they have switched to a new browser tab using dynamic [Tab notification](https://www.cartbounty.com/dynamic-browser-tab-notification "Dynamic browser Tab notification") (**Pro**)

Take advantage of abandoned cart email series, message personalization and other great features by upgrading to [CartBounty Pro](https://www.cartbounty.com).

== Installation ==

1. Go to your **WordPress dashboard > Plugins > Add new**
1. Search for "CartBounty"
1. Install and activate CartBounty
1. Optionally setup automated abandoned cart recovery emails using WordPress recovery
1. Optionally enable productivity tools like Exit Intent to increase the ratio of recoverable abandoned carts

== Frequently Asked Questions ==

= When is the cart saved? =

As soon as a product is added to the cart, it is visible to the store administrator in CartBounty abandoned carts. The cart remains anonymous until the user provides contact information from one of the following sources:

* [Exit Intent popup](https://www.cartbounty.com/exit-intent-popup-technology "Exit Intent popup technology") or [Early capture](https://www.cartbounty.com/early-capture-add-to-cart-popup "Early capture popup") tools
* WooCommerce Checkout form
* The user's account if they are logged in
* [Web push notification](https://www.cartbounty.com/web-push-notifications-abandoned-cart-recovery/ "Web push notification") permission

As soon as CartBounty has user's contact information, the anonymous cart is turned into a recoverable cart. After the user places an order, the abandoned cart is immediately removed from the list of abandoned carts.

If you would like to enable Unfinished order recovery, please consider upgrading to [CartBounty Pro](https://www.cartbounty.com).

= When is a cart considered abandoned? =

To be considered abandoned, a shopping cart must remain inactive for a period of 60 minutes after the last user activity. If you see a "shopping" status in the CartBounty abandoned cart status column, it means the user is still actively shopping and has not yet abandoned their cart.

Notifications or reminders will only be sent out after the shopping cart is abandoned and the "shopping" status has been removed.


> Example. If you've configured your first abandoned cart recovery email, text message or Push notification to be sent after 5 minutes, the user will receive it approximately 65 minutes later (i.e., 60 minutes after the cart is abandoned, plus 5 minutes for the configured delay).

= How to send abandoned cart recovery messages? =

Once the cart is abandoned, an automated reminder or a series of multiple reminders over a period can be sent out to the user to remind about items in the shopping cart.

The free version of CartBounty offers a basic solution for sending abandoned cart recovery emails using default WordPress mail server. This recovery option works well if you have a small to medium number of abandoned carts.

Upgrade to [CartBounty Pro](https://www.cartbounty.com) to setup and send automated abandoned cart recovery Push notifications, emails, WhatsApp and SMS text messages using [ActiveCampaign](https://www.activecampaign.com/?_r=5347LGDC)*, [GetResponse](https://www.getresponse.com/?a=vPJGRchyVX&c=cartbounty_free_readme)*, [MailChimp](http://eepurl.com/hHjfrX)*, [WhatsApp](https://www.cartbounty.com/whatsapp-abandoned-cart-recovery-reminders)* or [BulkGate](https://portal.bulkgate.com/join/55713)*.

= What are anonymous carts? =

Carts that cannot be identified are classified as anonymous since the visitor has not provided any contact information. In this scenario, the user has added one or multiple items to the cart but has not provided any contact information that can later be used to recover it.

Perhaps you are curious as to why someone would want to save them? Here are a couple of reasons:

To keep track of live shopping cart activity and get a better understanding of what's happening in your store.
To identify the most popular products that are being added to carts.
To gather information about the potential revenue from abandoned carts.

CartBounty settings allow you to disable anonymous carts or allow them only from specific countries.

= How does Exit Intent Technology work? =

Exit Intent technology is a smart way of monitoring user behavior, including mouse movements, scroll speed, and direction, to determine when a user is about to leave the website. When this behavior is detected, a popup appears to engage the user. The purpose of the Exit Intent popup is to motivate the user to complete their purchase or provide their contact information which later can be used for abandoned cart recovery.

Learn more about [Exit Intent Technology](https://www.cartbounty.com/exit-intent-popup-technology "Exit Intent popup technology") and the principles of Mobile Exit Intent popup.

= How to use CartBounty templates? =

The public-facing components of CartBounty, such as the Exit Intent popup and WordPress recovery emails, can be easily customized using the plugin's settings. However, if you need more advanced customization options, you can use the pre-built CartBounty templates or take advantage of the available actions and filters.

You will find all available template files inside **/plugins/woo-save-abandoned-carts/templates** folder. When you open these files, you will notice they all contain hooks that allow you to add, edit or remove content without the need to edit template files themselves. This method protects against plugin upgrade issues, as the template files can be left completely untouched.

Please copy the template file you require to your active theme to keep your customization intact after plugin updates. You can copy them to either one of these locations:

* your_theme_name/templates/emails/cartbounty-email-light.php
* your_theme_name/templates/cartbounty-exit-intent.php
* your_theme_name/cartbounty-exit-intent.php

Now you can edit your copied template file and it will override default CartBounty template file.

= What Actions and Filters are available? =

Along with the customization options available in plugin settings, CartBounty also allows the use of different hooks for advanced customization. These hooks are an excellent way if you are looking to alter or extend the features of CartBounty without modifying the core files of the plugin.

Below you will find a list of hooks available in CartBounty alongside different examples. When using these actions and filters to modify the plugin, please add your code in the functions.php file of your theme.

**General hooks**

Filters:

* cartbounty_from_email
* cartbounty_waiting_time
* cartbounty_include_tax
* cartbounty_price_format
* cartbounty_display_currency_code
* cartbounty_save_custom_fields
* cartbounty_custom_email_selectors
* cartbounty_custom_phone_selectors
* cartbounty_custom_add_to_cart_button_selectors
* cartbounty_phone_validation
* cartbounty_disable_input_bot_test
* cartbounty_restore_classic_checkout
* cartbounty_restore_block_checkout
* cartbounty_cart_cooldown_period
* cartbounty_cart_ip_cooldown_period

Here is an example how to change the From email that sends out notification emails using "cartbounty_from_email" filter. Please add it to your theme's functions.php file:

	function change_from_email( $html ){
		return 'your@email.com';
	}
	add_filter( 'cartbounty_from_email', 'change_from_email' );

Example how to customize default waiting time after which the cart is considered abandoned using "cartbounty_waiting_time" filter from 60 minutes (default time) to 30 minutes. Add it to your theme's functions.php file:

	function change_waiting_time( $minutes ){
		return 30; //Minimum allowed time is 20 minutes
	}
	add_filter( 'cartbounty_waiting_time', 'change_waiting_time' );

Example how to display abandoned cart product prices excluding taxes:

	add_filter( 'cartbounty_include_tax', '__return_false' );

**Exit Intent hooks**

Exit Intent template contains different actions and filters that allow you to create new, edit, replace, or remove existing content including the main image in Exit Intent window.

Actions:

* cartbounty_exit_intent_start
* cartbounty_exit_intent_after_title
* cartbounty_exit_intent_before_form_fields
* cartbounty_exit_intent_end

Filters:

* cartbounty_exit_intent_close_html
* cartbounty_exit_intent_image_html
* cartbounty_exit_intent_title_html
* cartbounty_exit_intent_description_html
* cartbounty_exit_intent_field_html
* cartbounty_exit_intent_button_html

Here is an example how to add additional subtitle after the main title using our "cartbounty_exit_intent_after_title" action hook. Please add it to your theme's functions.php file:

	function add_extra_html_after_title() {
    	echo "<p>Additional subtitle here...</p>";
	}
	add_action('cartbounty_exit_intent_after_title', 'add_extra_html_after_title' );

Example how to change the main image using a filter:

	function modify_image( $html ){
		return '<img src="http://www.link-to-your-custom-image-here..."/>';
	}
	add_filter( 'cartbounty_exit_intent_image_html', 'modify_image' );

Example how to change the main title using a filter:

	function modify_title( $html ) {
		$custom_title = 'Your text here...';
		return preg_replace('#(<h2[^>]*>).*?(</h2>)#', "$1 $custom_title $2", $html);
	}
	add_filter( 'cartbounty_exit_intent_title_html', 'modify_title' );

Example how to change the description using a filter:

	function modify_description( $html ){
		$custom_description = 'New description here...';
		return preg_replace('#(<p[^>]*>).*?(</p>)#', "$1 $custom_description $2", $html);
	}
	add_filter( 'cartbounty_exit_intent_description_html', 'modify_description' );

**WordPress email hooks**

WordPress abandoned cart reminder template uses multiple actions and filters which can be used to alter the contents an appearance of the email.

Actions:

* cartbounty_automation_before_title
* cartbounty_automation_after_title
* cartbounty_automation_after_intro
* cartbounty_automation_after_button
* cartbounty_automation_footer_start
* cartbounty_automation_footer_end

Filters:

* cartbounty_automation_title_html
* cartbounty_automation_intro_html
* cartbounty_automation_button_html
* cartbounty_automation_copyright
* cartbounty_automation_footer_address_1
* cartbounty_automation_footer_address_2
* cartbounty_automation_unsubscribe_html
* cartbounty_wordpress_batch_email_limit

Example how to add additional content right before the main title in WordPress recovery reminder email:

	function cartbounty_automation_add_extra_title(){
	    esc_html_e( 'Additional content before main title', 'woo-save-abandoned-carts' );
	}
	add_action( 'cartbounty_automation_before_title', 'cartbounty_automation_add_extra_title' );

An example how to use a filter to alter the main title:

	function cartbounty_alter_automation_title( $title ){
	    return '<h1 style="font-size: 60px; padding-bottom: 30px;">'. __('My new title', 'woo-save-abandoned-carts') .'</h1>';
	}
	add_filter( 'cartbounty_automation_title_html', 'cartbounty_alter_automation_title' );

Example how to replace existing button name from "Complete checkout" to "Return to cart":

	function cartbounty_alter_automation_button( $button_html, $args ) {
		$new_text = __( 'Return to cart', 'woo-save-abandoned-carts' ); // Modify the button text
		$button_html = sprintf(
			'<a href="%1$s" title="%4$s" style="margin: 0; outline: none; padding: 0; box-shadow: none;">
			<span style="padding: 18px 35px; background-color: %3$s; border-radius: 4px; color: %2$s; font-family: \'Open Sans\', Roboto, \'San Francisco\', Arial, Helvetica, sans-serif; display:inline-block; border: 0px none; font-size: 17px; font-weight: bold; line-height: 1; letter-spacing: normal; text-align: center; text-decoration: none; outline: none;">%4$s</span>
			</a>',
			esc_url( $args['recovery_link'] ), 
			esc_attr( $args['main_color'] ), 
			esc_attr( $args['button_color'] ), 
			esc_html( $new_text )
		);
		return $button_html;
	}

	add_filter( 'cartbounty_automation_button_html', 'cartbounty_alter_automation_button', 10, 2 );

How to change the default footer address. By default, it is taken from WooCommerce store address you have entered, but you can change it using a filter:

	function cartbounty_alter_automation_footer_address_1( $address ){
	    esc_html_e('First address line...', 'woo-save-abandoned-carts');
	}
	add_filter( 'cartbounty_automation_footer_address_1', 'cartbounty_alter_automation_footer_address_1' );

	function cartbounty_alter_automation_footer_address_2( $address ){
	    esc_html_e('Second address line...', 'woo-save-abandoned-carts');
	}
	add_filter( 'cartbounty_automation_footer_address_2', 'cartbounty_alter_automation_footer_address_2' );

= How to prevent bots from leaving anonymous carts? =

If you have noticed unusual amounts of multiple new anonymous carts being left almost at the same time, from one country and consisting of a single product, it might be that they are left by bots who are visiting your store.

Bots can be divided into two groups – good ones and bad ones.

* Good bots. The most common example of a good bot could be a web crawler. It is a bot that is sent via a search engine like Google to index your shop. Online store owners generally welcome these bots, because it keeps their content and products visible in the search engine results and hopefully will attract new visitors
* Harmful bots. These bots are visiting your store for malicious purposes. Their actions range from mildly harmful to potentially critical. Bad bots are scanning your store for weak spots, security holes, ways to take over your store, steal your visitor credit card data etc. Besides that, they are also increasing stress on your server thus slowing down your store

Harmful bots are the ones that might be responsible for leaving new anonymous carts on your website. While this is not dangerous, it can be frustrating and annoying. Here are three solutions that will help you to deal to with them:

1. The quick solution is to simply disable anonymous carts from being saved by CartBounty. You can do this in the CartBounty settings. As easy as this solution is, it only deals with consequences and does not stop these harmful bots from visiting your store, continuously searching for new vulnerabilities, and slowing down your shop
1. A better solution would be to install a WordPress plugin that helps to prevent bots from visiting your store. You could try out a couple of different plugins, but this might be a good starting point: [Blackhole for Bad Bots](https://wordpress.org/plugins/blackhole-bad-bots). This way you will block harmful bots from wandering around your store and keep anonymous carts enabled to see what your customers are shopping for
1. If you have a developer, they can help you check your server access logs to identify any bot entries. Then, you can use the .htaccess file to block these bots and prevent them from visiting your website. Check out this article for more information on [blocking bad bots](https://www.seoblog.com/block-bots-spiders-htaccess).

In addition, the Pro version allows you to select if guests from specific countries should be able to leave anonymous carts thus making sure that bots coming from countries you do not sell to are not able to leave anonymous carts.

== Screenshots ==

1. CartBounty Dashboard and abandoned cart reports including cart abandonment rate stats, abandoned cart data by country and top abandoned products
2. Abandoned cart list
3. Automated abandoned cart recovery using WordPress email reminders
4. WordPress recovery email settings
5. WordPress recovery email preview
6. Exit Intent popup settings
7. General settings
8. How Exit Intent popup looks like once the user tries to leave the shop

== Changelog ==

= 8.10 =
* Improved compatibility with the latest WooCommerce blocks checkout field restoration
* Code refactoring

[See changelog for all versions](https://raw.githubusercontent.com/Streamlinelv/woo-save-abandoned-carts/master/changelog.txt).