=== Dobare Customer Loyalty Club ===
Contributors: idekavangroup, dobare
Donate link: https://dobare.me
Tags: customer loyalty, cashback, SMS notifications, WooCommerce, customer retention
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.1
Stable tag: 1.3.7
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Dobare is a powerful customer loyalty plugin for Iranian WooCommerce stores. Using SMS notifications, Dobare helps increase customer loyalty and boost your sales.

== Description ==

**Dobare Customer Loyalty Club** is a cloud-based customer loyalty solution that seamlessly integrates with your WooCommerce store. This plugin processes every order and customer data, executing various actions focused primarily on sending SMS-based cashback notifications. Unlike traditional loyalty programs that use email, Dobare uses SMS to notify customers about credits and cashback rewards, making communication more direct and effective.

**Key Features:**

- **Cashback & Credit Reminders:** Automatically send SMS notifications to customers about their available cashback and credits during checkout.
- **Customer Segmentation:** Categorize customers based on historical data for targeted marketing campaigns.
- **Bulk Campaigns:** Run bulk campaigns to offer credits or discount codes to specific segments or all customers.
- **Special Occasion Gifts:** Send birthday and anniversary gifts via SMS to strengthen customer relationships.
- **Event-Based Actions:** Trigger various actions such as cashback, credit, discount codes, or plain SMS based on events like registration, order submission, survey completion, and profile updates.
- **Post-Order Surveys:** Engage customers by sending survey messages after order completion.
- **Comprehensive Management Panel:** Access diverse features through the Dobare management panel for advanced customization and management.

**Competitive Advantages:**

- **SMS-Based Communication:** Uses SMS for immediate communication and higher engagement compared to email.
- **Cash Rewards:** Offers cash rewards instead of points, which are more tangible and valuable to customers.
- **Seamless Integration:** Easily connect your WooCommerce store to the Dobare platform at [dobare.me](https://dobare.me).

---

**Persian Description (برای ترجمه):**

**باشگاه مشتریان دوباره | Dobare** یک راه‌حل ابری برای برنامه وفادارسازی مشتریان است که به‌طور یکپارچه با فروشگاه ووکامرس شما ادغام می‌شود. این افزونه هر سفارش و داده‌های کاربر را پردازش کرده و اقدام‌های مختلفی را اجرا می‌کند که بیشتر بر ارسال پیامک‌های نقدی تمرکز دارد. برخلاف برنامه‌های وفاداری سنتی که از ایمیل استفاده می‌کنند، Dobare از پیامک برای اطلاع‌رسانی به کاربران درباره اعتبارات و پاداش‌های نقدی استفاده می‌کند که این ارتباط مستقیم‌تر و تاثیرگذارتر است.

**ویژگی‌های کلیدی:**

- **یادآوری نقدی و اعتبارات:** ارسال خودکار پیامک‌های اطلاع‌رسانی به مشتریان درباره نقدی و اعتبارات موجود در فرآیند پرداخت.
- **بخش‌بندی مشتریان:** دسته‌بندی مشتریان بر اساس داده‌های تاریخی برای بازاریابی هدفمند.
- **کمپین‌های انبوه:** اجرای کمپین‌های انبوه برای ارائه اعتبارات یا کد تخفیف به بخش‌های خاص یا تمامی مشتریان.
- **هدایای مناسبت‌های ویژه:** ارسال هدیه‌های تولد و سالگرد ازدواج از طریق پیامک برای تقویت روابط با مشتریان.
- **اقدام‌های مبتنی بر رویداد:** فعال‌سازی اقدامات مختلف مانند نقدی، اعتبار، کد تخفیف یا پیامک‌های خالص بر اساس رویدادهایی مانند عضویت، ارسال سفارش، تکمیل نظرسنجی و به‌روزرسانی پروفایل.
- **نظرسنجی پس از سفارش:** تعامل با مشتریان از طریق ارسال پیام‌های نظرسنجی پس از تکمیل سفارش.
- **پنل مدیریت جامع:** دسترسی به امکانات متنوع از طریق پنل مدیریت Dobare برای سفارشی‌سازی و مدیریت پیشرفته.

**مزایای رقابتی:**

- **اطلاع‌رسانی مبتنی بر پیامک:** استفاده از پیامک برای ارتباط فوری و تعامل بیشتر نسبت به ایمیل.
- **پاداش‌های نقدی:** ارائه پاداش‌های نقدی به جای امتیاز، که برای مشتریان ملموس‌تر و ارزشمندتر است.
- **ادغام یکپارچه:** اتصال آسان فروشگاه ووکامرس شما به پلتفرم Dobare موجود در [dobare.me](https://dobare.me).

== Frequently Asked Questions ==

= What is Dobare and how does it work? =

**Dobare** is a customer loyalty plugin for WooCommerce stores that uses SMS to notify customers about cashback rewards and credits. The plugin processes orders and customer data, executing actions such as sending cashback SMS, discount codes, and special occasion gifts.

= How is Dobare different from other loyalty plugins? =

Unlike traditional loyalty programs that use email and point systems, Dobare uses SMS for immediate and direct communication and offers cash rewards instead of points, which are more tangible and valuable to customers.

= Do I need a separate Dobare.me account to use this plugin? =

Yes, Dobare is a cloud-based service. To integrate the plugin with your WooCommerce store, you need to create an account at [dobare.me](https://dobare.me) and obtain API credentials.

= Is Dobare compatible with all WooCommerce plugins? =

Dobare works seamlessly with most WooCommerce plugins. However, compatibility with specific plugins should be tested separately. If you encounter any issues, please contact our support team.

= How secure is customer data with Dobare? =

Dobare prioritizes the security and privacy of your customer data. All data transfers between your WooCommerce store and the Dobare platform are encrypted, and we follow data protection standards.

= Can I customize SMS templates? =

Yes, Dobare provides the ability to customize SMS templates to match your brand voice and communication style. You can edit content directly in the plugin settings.

---

**Persian FAQ (برای ترجمه):**

= Dobare چیست و چگونه کار می‌کند؟ =

**Dobare** یک افزونه برنامه وفادارسازی مشتریان برای فروشگاه‌های ووکامرس است که از پیامک برای اطلاع‌رسانی به مشتریان درباره پاداش‌های نقدی و اعتبارات استفاده می‌کند. این افزونه سفارشات و داده‌های کاربران را پردازش کرده و اقدام‌هایی مانند ارسال پیامک‌های نقدی، کد تخفیف و هدیه‌های مناسبت‌های ویژه را اجرا می‌کند.

= Dobare چگونه با سایر افزونه‌های وفاداری متفاوت است؟ =

برخلاف برنامه‌های وفاداری سنتی که از ایمیل و امتیازهای نقطه‌ای استفاده می‌کنند، Dobare از پیامک برای ارتباط فوری و مستقیم و از پاداش‌های نقدی به جای امتیاز استفاده می‌کند که برای مشتریان ملموس‌تر و ارزشمندتر است.

= آیا برای استفاده از این افزونه نیاز به حساب Dobare.me جداگانه دارم؟ =

بله، Dobare یک سرویس ابری است. برای ادغام افزونه با فروشگاه ووکامرس خود، نیاز به ایجاد حساب در [dobare.me](https://dobare.me) و دریافت اطلاعات API دارید.

= آیا Dobare با تمام افزونه‌های ووکامرس سازگار است؟ =

Dobare به‌طور یکپارچه با بیشتر افزونه‌های ووکامرس کار می‌کند. با این حال، سازگاری با افزونه‌های خاص باید به‌طور جداگانه تست شود. در صورت مواجهه با هرگونه مشکل، لطفاً با تیم پشتیبانی ما تماس بگیرید.

= امنیت داده‌های مشتریان با Dobare چقدر تضمین شده است؟ =

Dobare امنیت و حریم خصوصی داده‌های مشتریان شما را در اولویت قرار می‌دهد. تمامی انتقال داده‌ها بین فروشگاه ووکامرس شما و پلتفرم Dobare رمزگذاری شده و ما از استانداردهای محافظت از داده‌ها پیروی می‌کنیم.

= آیا می‌توانم قالب‌های پیامک را سفارشی‌سازی کنم؟ =

بله، Dobare امکان سفارشی‌سازی قالب‌های پیامک را برای مطابقت با صدای برند و سبک ارتباطی شما فراهم می‌کند. می‌توانید محتوا را مستقیماً در تنظیمات افزونه ویرایش کنید.

== External services ==

This plugin communicates with the following external services to provide customer loyalty features:

**Dobare API**
* Service: [api.dobare.me](https://api.dobare.me)
* Purpose: This API provides the core Dobare services, enabling customer loyalty management, SMS sending, credit and cashback management, and other customer loyalty-related features.
* Data sent: 
  - Store order information (including amount, products, order status)
  - Customer information (name, mobile phone number, email)
  - Store information (name, domain, website address)
  - Store admin identity information (username, full name, email)
* When data is sent: During plugin activation, new order registration, order status changes, and customer information updates
* Terms of Service: [Dobare Terms of Service](https://dobare.me/terms)
* Privacy Policy: [Dobare Privacy Policy](https://dobare.me/privacy)

**Dobare Management Panel**
* Service: [dobare.reval.me](https://dobare.reval.me)
* Purpose: This service provides a dedicated management panel for store administrators to manage loyalty campaigns, credits, and other customer club settings.
* Data sent: User authentication and management panel access
* When data is sent: When the user logs into the management panel
* Terms of Service: [Dobare Terms of Service](https://dobare.me/terms)
* Privacy Policy: [Dobare Privacy Policy](https://dobare.me/privacy)

**Dobare WordPress Help Center**
* Service: [wp.dobare.me](https://wp.dobare.me)
* Purpose: Hosts contextual guides and documentation that can be opened from the plugin’s admin screens (e.g., “What is cashback?” links).
* Data sent: Standard browser request metadata only (IP address, user agent). No store data or credentials are transmitted by the plugin automatically.
* When data is sent: Only when an administrator clicks one of the embedded help links in the Dobare dashboard UI.
* Terms of Service: [Dobare Terms of Service](https://dobare.me/terms)
* Privacy Policy: [Dobare Privacy Policy](https://dobare.me/privacy)

**Error Tracking Service (Sentry)**
* Service: [sentry.io](https://sentry.io)
* Purpose: This service is used to track and resolve potential errors in the plugin to help us improve plugin performance.
* Data sent: Technical errors, plugin version, system environment information (PHP version, WordPress version)
* When data is sent: Only when an error occurs in the plugin
* Terms of Service: [Sentry Terms of Service](https://sentry.io/terms/)
* Privacy Policy: [Sentry Privacy Policy](https://sentry.io/privacy/)

Note: All data transfers between your WooCommerce store and external services are encrypted using HTTPS protocol, and we are committed to maintaining the security and confidentiality of your customer data.

== Short Description ==

Dobare is a WooCommerce plugin that boosts customer loyalty through SMS-based cashback and credit reminders, offering a tangible and engaging reward system for Iranian online stores.

== Additional Information ==

برای اطلاعات بیشتر، پشتیبانی و مستندات، به وب‌سایت ما مراجعه کنید: [dobare.me](https://dobare.me)

== Filters ==

= dobare_should_apply_credit =

This filter runs right before Dobare attempts to create and apply the automatic coupon that consumes a member's credit. Returning `false` prevents the credit from being applied for the current request, while returning `true` keeps the default behavior. The filter receives the resolved `Dobare_Membership` object, the normalized phone number, the current WooCommerce cart/session objects, and a small context array (cart subtotal + minimum required subtotal) so you can tailor the decision to business rules.

```
add_filter(
	'dobare_should_apply_credit',
	function ( $should_apply, $membership, $phone_number, $cart, $session, $context ) {
		// Example: disable auto-apply when cart contains pre-order items.
		if ( $cart && $cart->get_cart_contents_count() > 0 ) {
			foreach ( $cart->get_cart() as $cart_item ) {
				if ( ! empty( $cart_item['data'] ) && $cart_item['data']->is_on_backorder() ) {
					return false;
				}
			}
		}

		// Example: limit the automatically applied amount.
		if ( $membership->gift_credit_amount > 500000 ) {
			$membership->gift_credit_amount = 500000;
		}

		return $should_apply;
	},
	10,
	6
);
```