=== OneClick Chat to Order ===
Contributors: walterpinem
Donate link: https://www.paypal.me/WalterPinem
Tags: woocommerce, woocommerce whatsapp, whatsapp, whatsapp chat, click to chat
Requires at least: 5.3
Tested up to: 6.6.2
Stable tag: 1.0.7
Requires PHP: 7.4
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Make customers easily purchase products through WhatsApp with a single click and increase your sales.

== Description ==

### Speed up the purchase process. Increase your sales!

Formerly known as "OneClick WhatsApp Order", **OneClick Chat to Order** will make it easier for your customers to order your products directly through WhatsApp with a single click. Connect your WooCommerce-powered online store with WhatsApp and make it super quick and easy for your customers to complete their order via WhatsApp.

> Want to see it live? [Try it yourself!](https://walterpinem.me/projects/oneclick/).

### **Premium Add-on(s)**
* [**OneClick WCFM Connector**](https://www.onlinestorekit.com/oneclick-wcfm-connector/): Seamlessly combine the power of WordPress & WooCommerce, OneClick Chat to Order, WCFM Marketplace Multivendor, WCFM Frontend Manager and WhatsApp.
* More powerful add-ons coming soon!

### **The Features You'll Love:**
* **NEW!: Single Product Shortcode** generator. Display the shortcode on the current product page or set a specific product by ID, and the corresponding WhatsApp message will include the product's details.
* **NEW!: Five selectable WhatsApp button positions** on single product page.
* **NEW!: Hide WhatsApp and floating buttons** on all posts and pages, specific posts, pages, product categories and tags.
* **NEW!: Button color customization options** for WhatsApp and floating buttons.
* **NEW!: Multiple Numbers feature.** Now you can add more than one WhatsApp numbers and assign them to specific page on your entire store. [**Learn more**](https://walterpinem.me/projects/oneclick-chat-to-order-mutiple-numbers-feature/) or [**watch tutorial**](https://www.youtube.com/watch?v=TSBsxEdiNuA).
* **NEW!: Option to assign a WhatsApp number** from a list of created numbers only for a single product.
* **NEW!: An option to hide or show the Order Date** from WA message sent from Thank You page.
* **NEW!: An option to include Order Number** from WA message sent from Thank You page.
* **NEW!: Options to set button text and custom message for individual product**, including option to individually hide / show WhatsApp button on single product page
* **NEW!: Options to individually hide button on shop loop, cart, and thank you page** on mobile and desktop
* **NEW!: Option to include source page URL** in the message when the floating button is clicked
* **NEW!: Option to include product variation on Cart page** (only one variation from each product)
* **NEW!: Option to include coupon code in the Checkout page** (that will include coupon code details in the message)
* **NEW! Option to Override Thank You Page Title**: Override Thank You page title and add a WhatsApp button to send complete order details via WhatsApp for faster response.
* **NEW! Option to Show Button on Cart page**: Make it possible to complete the order via WhatsApp for faster checkout.
* **NEW! Option to Show Button on Shop page**: Order via WhatsApp using a button directly on Shop page product loop.
* **NEW!** Options to hide button both on Desktop and Mobile respectively
* **NEW!** Options to change labels for product details in sent message
* **NEW!** Converted customer's number into clickable WhatsApp link on Order Details page (admin Dashboard)
* **Option to Show Button Only on Mobile**: Or enable on all types of devices.
* **Custom Message**: Set pre-filled custom message to greet you on WhatsApp.
* **Product Details**: Set pre-filled product details such as product title + price + product URL.
* **Custom Text on Button**: Customize the text on Chat to Order button and make it yours.
* **Hide Price on Product Page**: Option to hide price on every product page.
* **Hide Add to Cart Button on Product Page**: Option to hide Add to Cart button on product page to let Chat to Order button stand out.
* **Display Floating Button**: Option to display a floating Chat to Order button.
* **Customize Floating Button Position**: Whether left or right, it's yours to decide.
* **Custom Message for Floating Button**: Set pre-filled custom message specially made for floating button.
* **Floating Button Display Option**: Show or hide floating button on mobile.
* **Shortcode Generator**: You can generate your own shortcode and display the button anywhere on your site, easily!
* **GDPR-Ready**: Enable GDPR notice and make the button unclickable until the Privacey Policy page is read and agreed.
* **More to come!**

> For more info, please refer to [this page](https://www.seniberpikir.com/oneclick-whatsapp-order-woocommerce/) for Indonesian users or on [this page](https://walterpinem.me/projects/oneclick-chat-to-order/) and [Online Store Kit](https://www.onlinestorekit.com/oneclick-chat-to-order/) for international users.

### **Watch the Complete Overview and Tutorial**

It's really easy to get started. Here's the complete overview and tutorial:

https://www.youtube.com/embed/LuURM5vZyB8

== Further Questions and Feature Requests? ==

Premium-quality support without having to spend a dime. Just send your inquiry or feature request on [Walter Pinem Projects](https://walterpinem.me/projects/contact/ "Walter Pinem Projects") and I'll gladly help you out.

== Installation ==
1. Make sure your site has WooCommerce installed and activated.
2. Install and activate this plugin via dashboard or file manager.
3. Begin configurating this plugin through OneClick Chat to Order admin menu.
4. Complete the configuration and you're all set!

== Frequently Asked Questions ==
= Is it free to use? =
Definitely free to use for unlimited sites! ;)

= How to install and use OneClick Chat to Order? =
1. Make sure your site has WooCommerce installed and activated.
2. Install and activate this plugin via dashboard or file manager.
3. Begin configurating this plugin through OneClick Chat to Order admin menu.
4. Complete the configuration and you're all set!

[**Watch Tutorial**](https://www.youtube.com/watch?v=LuURM5vZyB8 "OneClick Chat to Order Tutorial") to help you get started.

= Can I use more than one WhatsApp number? =
Of course you can! Now, you can set and use unlimited WhatsApp numbers.

[**Learn more**](https://walterpinem.me/projects/oneclick-chat-to-order-mutiple-numbers-feature/) or [**watch tutorial**](https://www.youtube.com/watch?v=TSBsxEdiNuA)

= Can I use it with 3rd party Multivendor plugins? =
As for now, this plugin is not natively compatible with any other 3rd party Multivendor plugins.

= Do I have the options to display the WhatsApp button on specific page only? =
You have! There are fully functional options to let you decide on what pages you'd like to display the WhatsApp button, whether on single product page, cart, shop loop, checkout, floating, or even show it anywhere using the Shortcode Generator feature.

= Can I show WhatsApp button only on mobile devices? =
Of course! You are just one click away to show the button only on mobile devices.

= Does this plugin compatible with latest WooCommerce version? =
This plugin will regularly be updated to make sure its compatibility.

= Where can I ask another question? =
You will get answers to many of your questions on my [contact form](https://walterpinem.me/projects/contact/). Just ask!

== Screenshots ==
1. Setting panel for Single Product page inside Basic settings tab
2. Add new WhatsApp number admin interface
3. WhatsApp button output on the front-end, single product page
4. WhatsApp button output with GDPR checkbox on the front-end, single product page
5. WhatsApp button output on the front-end, Shop page / loop
6. WhatsApp button output on the front-end, Cart page
7. WhatsApp button output on the front-end, Order Received / Thank You page
8. WhatsApp button shortcode output on the front-end

== Changelog ==
= 1.0.7 - September 30, 2024 =
* **[New]** Added a Single Product Page shortcode that pulls in product details and can be placed anywhere.
* **[New]** Introduced options for controlling the WhatsApp base URL for both mobile and desktop devices.
* **[Improvement]** Enhanced text configurability for better label customization in WhatsApp messages.
* **[Improvement]** Added an option to include both regular and sale prices in messages sent from single product pages.
* **[Improvement]** Introduced two new button positions on single product pages: "After Single Product Summary" and "Around Product Share Area".
* **[Improvement]** Added an option to make the WhatsApp button full width on single product pages.
* **[Improvement]** Introduced an option to include tax information in messages sent from the Cart page.
* **[Improvement]** Enhanced WhatsApp messages sent from the Cart page to include coupons, price calculations, tax, shipping details, and more.
* **[Improvement]** Added an option to display the "Total Products" label in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Introduced options to include or exclude coupon/discount information in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added options to include or exclude the Order Summary Link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude the Payment Link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude the "View Order" link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Introduced an option to include or exclude the Order Number in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude tax information in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Fixed an issue where key details were missing from messages sent from the Thank You page.
* **[Improvement]** Refactored the message structure for the Thank You page to conditionally display shipping address details if they differ from the billing address.
* **[Improvement]** Fixed an issue where the WhatsApp button did not display on the Cart page.
* **[Improvement]** Added transients for improved database performance.
* **[Improvement]** Optimized, sanitized, and made all strings translation-ready.
* **[Improvement]** Refactored the codebase for single product pages for better performance.
* **[Improvement]** Refactored the codebase for the shop loop and product archive pages.
* **[Improvement]** Added padding and margin options for the floating button.
* **[Improvement]** Added padding and margin options for the floating button icon.
* **[Improvement]** Enhanced the rendering of the Floating Button.
* **[Improvement]** Fixed an issue where the WhatsApp button wasn't visible when the "Hide Add to Cart" option was enabled.
* **[Improvement]** Introduced the ability to customize output via `apply_filters()` for various configurable variables.
* **[Improvement]** Added filters to make key elements configurable across various sections, such as product names, prices, and URLs for WhatsApp messages.
* **[Improvement]** Refactored and optimized the floating button CSS, making margin and padding values dynamically configurable via settings.
* **[Improvement]** Added validation checks and improved security for input handling across shortcode attributes, ensuring safer usage and improved performance.

= 1.0.6 - December 15, 2023 =
* Fixed Stored Cross-Site Scripting for the 'waorder' shortcode
* Fixed the WhatsApp button not showing on Thank You / Order Received page.
* Fixed the WhatsApp button not showing on a single product page where the Hide Add to Cart button? is checked.
* Optimized the way the saved options fetched from database.
* Code cleaned up

= 1.0.5 - November 16, 2023 =
* Fixed Stored Cross-Site Scripting (XSS) vulnerability
* Fixed various unescaped input fields for better security
* Fixed the output of messages on Cart and Checkout pages
* Fixed the output of stylings on the front-end from Display Options settings page
* Compatibility with the latest WordPress version and the WooCommerce High-Performance Order Storage (HPOS)
* Simplified major code logics for better security, best practice, and performance
* Removed the option to select WhatsApp base subdomain URL (previously there are options to select either api* or web*)
* Updated wp-color-picker-alpha to the latest version
* Code cleaned up

= 1.0.4.2 - December 27, 2022 =
* Fixed Stored Cross-Site Scripting vulnerability in an unescaped data
* Code cleaned up

= 1.0.4.1 - December 07, 2020 =
* Fixed a minor issue on Floating settings tab
* Code cleaned up

= 1.0.4 - December 06, 2020 =
* New: Three new selectable WhatsApp button positions on single product page to fix issue for users using theme with ajax feature.
* New: Hide WhatsApp and floating buttons on all posts and pages, specific posts, pages, product categories and tags.
* New: Button color & box shadpw customization options for WhatsApp and floating buttons.
* New: Button margin & padding customization options for WhatsApp button on single product page.
* New: Hide Add to Cart button only on a specific product via product editor page.
* New: The force show the Add to Cart button option on product editor page to keep displaying Add to Cart button regardless the configuration you set on the global settings page.
* [Improvement] New selectable WhatsApp base URL to improve clickable link on mobile devices.
* [Improvement] Replaced the mobile detection to fix the issue on iOS devices.
* [Improvement] Translations updated for Bahasa Indonesia.
* WooCommerce Latest Version Compatibility v4.7.1.
* Code cleaned up.

= 1.0.3 - November 06, 2020 =
* Fixed message sent from Thank You page didn't include customer details
* Fixed the structure of message sent from Cart page
* WooCommerce Latest Version Compatibility v4.6.2
* Code cleaned up.

= 1.0.2 - November 04, 2020 =
* Fixed floating button with no number issue.
* Fixed and cleaned code on every file for displaying button.
* Code cleaned up.

= 1.0.1 - November 02, 2020 =
* New: Shipping name and its cost in the message sent from Order Received & Cart page. If exists, it will show shipping address and details instead of customer's billing info.
* New: Option to set Customer Details Label in the message sent from Order Received page.
* New: Option to include product SKU in the message sent from Order Received page.
* New: Automatically include all selected product attributes / variations in the message sent from Order Received page.
* New: Option to hide floating button only on desktop.
* [Improvement] Include all selected product attributes / variations in the message sent from Cart page instead of just one.
* [Improvement] Price amount format for discounts.
* [Improvement] Added discount deduction formula.
* [Improvement] Added subtotal & total price before and after discount.
* [Improvement] Added a shortcode generator to generate a dynamic shortcode instead of just using one shortcode for all.
* [Improvement] Fixed possible SEO issues for number custom post type. Set publicly_queryable to false to prevent possible SEO issues everytime a WhatsApp number is set and published, and removed the number redirection.
* Fixed undefined post ID notice on the front end when no WhatsApp number is published.
* Fixed and added default custom button and floating button tooltip texts when they are still empty.
* Code cleaned up.

= 1.0.0 - October 20, 2020 =
* New: Multiple Numbers feature. Now every user can add more than one WhatsApp numbers and assign them to specific page.
* New: Option to assign a WhatsApp number from a list of created numbers only for a single product.
* New: An option to hide or show the Order Date from WA message sent from Thank You page.
* New: An option to include Order Number from WA message sent from Thank You page.
* Fixed WhatsApp base URL to make it compatible on both mobile and desktop
* Fixed pricing format and currency issues
* Fixed order date time format
* Fixed other minor issues
* Code cleaned up

= 0.1.9.1 - May 11, 2020 =
* Fixed a minor issue
* Code cleaned up

= 0.1.9 - May 11, 2020 =
* New: Option to exclude price in the message sent from Shop loop page
* New: Option to open shortcode button link in new tab
* Fixed discount amount sent from checkout page

= 0.1.8 - May 10, 2020 =
* Fixed missing file issue

= 0.1.7 - May 10, 2020 =
* New: Options to set button text and custom message for individual product, including option to individually hide / show WhatsApp button on single product page
* New: Options to individually hide button on shop loop, cart, and thank you page on mobile and desktop
* New: Option to include source page URL in the message when the floating button is clicked
* New: Option to include product variation on Cart page (only one variation from each product)
* New: Option to include coupon code in the Checkout put (that will include coupon code details in the message)
* WooCommerce Latest Version Compatibility v4.1.0
* Various bug fixes
* Code cleaned up

= 0.1.6 - May 06, 2020 =
* Fixed incorrect number of the total amount (thanks @atempel for pointing this out)
* Code cleaned up

= 0.1.5 - May 02, 2020 =
* New: Full options to individually hide or show WhatsApp button on every page
* New: Individual options to exclude some labels in the message and managing button click target
* Misc: Replaced icon depedency to make it faster in terms of loading speed
* Fixed major issues such as incorrect number format and some non-functional plugin options
* Fixed CSS issues
* Code cleaned up

= 0.1.4 - April 15, 2020 =
* Fixed issues on some themes
* Fixed CSS issues
* Code cleaned up

= 0.1.3 - April 12, 2020 =
* New: Option to Override Thank You Page Title and add a WhatsApp button to send complete order details
* New: Option to show WhatsApp button on Cart page
* New: Option to show WhatsApp button on Shop page product loop
* New: Options to change labels for product details in sent message
* New: Converted customer's number into clickable WhatsApp link on Order Details page (admin Dashboard)
* New: Options to hide button both on Desktop and Mobile respectively
* Fixed button icon not showing
* Fixed other CSS issues
* Code cleaned up

= 0.1.2 - November 23, 2019 =
* Complying to Copyright and Trademark Guidelines
* Rebranded "OneClick WA Order" to "OneClick Chat to Order"
* Code cleaned up

= 0.1.1 - November 22, 2019 =
* Complying to Copyright and Trademark Guidelines
* Rebranded "OneClick WhatsApp Order" to "OneClick WA Order"
* Code cleaned up

= 0.1.0 - February 17, 2019 =
* [NEW] Option to exclude price in WA message output
* [NEW] Option to hide product quantity in a single product page (if sold individually)
* [Improvement] More translation-ready
* Code cleaned up

= 0.0.5 - February 12, 2019 =
* [Fix] CSS issue on WA button
* [Improvement] Compatibility with various themes
* Code cleaned up

= 0.0.4 - February 10, 2019 =
* [Fix] WA button is redirected to the same page when displaying GDPR checkbox
* [Improvement] Changed icons library into Font Awesome
* [Improvement] Tooltip on floating button is much more smooth than before
* [Improvement] Strings corrected and translations added
* Code cleaned up

= 0.0.3 - February 9, 2019 =
* [Improvement] Move WA button position: right beside the Add to Cart button, sit side-by-side
* [Improvement] Repositioned floating button icon
* Code cleaned up

= 0.0.2 - February 6, 2019 =
* [Improvement] Plugin setting page
* Code cleaned up

= 0.0.1 - February 3, 2019 =
* Initial Release

== Upgrade Notice ==
= 1.0.7 - September 30, 2024 =
* **[New]** Added a Single Product Page shortcode that pulls in product details and can be placed anywhere.
* **[New]** Introduced options for controlling the WhatsApp base URL for both mobile and desktop devices.
* **[Improvement]** Enhanced text configurability for better label customization in WhatsApp messages.
* **[Improvement]** Added an option to include both regular and sale prices in messages sent from single product pages.
* **[Improvement]** Introduced two new button positions on single product pages: "After Single Product Summary" and "Around Product Share Area".
* **[Improvement]** Added an option to make the WhatsApp button full width on single product pages.
* **[Improvement]** Introduced an option to include tax information in messages sent from the Cart page.
* **[Improvement]** Enhanced WhatsApp messages sent from the Cart page to include coupons, price calculations, tax, shipping details, and more.
* **[Improvement]** Added an option to display the "Total Products" label in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Introduced options to include or exclude coupon/discount information in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added options to include or exclude the Order Summary Link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude the Payment Link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude the "View Order" link in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Introduced an option to include or exclude the Order Number in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Added an option to include or exclude tax information in WhatsApp messages sent from the Thank You page.
* **[Improvement]** Fixed an issue where key details were missing from messages sent from the Thank You page.
* **[Improvement]** Refactored the message structure for the Thank You page to conditionally display shipping address details if they differ from the billing address.
* **[Improvement]** Fixed an issue where the WhatsApp button did not display on the Cart page.
* **[Improvement]** Added transients for improved database performance.
* **[Improvement]** Optimized, sanitized, and made all strings translation-ready.
* **[Improvement]** Refactored the codebase for single product pages for better performance.
* **[Improvement]** Refactored the codebase for the shop loop and product archive pages.
* **[Improvement]** Added padding and margin options for the floating button.
* **[Improvement]** Added padding and margin options for the floating button icon.
* **[Improvement]** Enhanced the rendering of the Floating Button.
* **[Improvement]** Fixed an issue where the WhatsApp button wasn't visible when the "Hide Add to Cart" option was enabled.
* **[Improvement]** Introduced the ability to customize output via `apply_filters()` for various configurable variables.
* **[Improvement]** Added filters to make key elements configurable across various sections, such as product names, prices, and URLs for WhatsApp messages.
* **[Improvement]** Refactored and optimized the floating button CSS, making margin and padding values dynamically configurable via settings.
* **[Improvement]** Added validation checks and improved security for input handling across shortcode attributes, ensuring safer usage and improved performance.