=== Appushy ===
Contributors: shafayatbayezid
Tags: woocommerce, push notification, appilix, tutor lms, mobile app, better messages
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send automatic native app push notifications from WooCommerce orders, Tutor LMS enrollments, and Better Messages conversations, straight to your Appilix app — no code required.

== Description ==

Appilix turns your WordPress site into a native Android/iOS app. It gives you a Push Notification API and a user-identity mechanism, but using either from WooCommerce order events requires writing and hosting your own integration code — not realistic for Appilix's largely no-code audience.

Appushy closes that gap. Connect your Appilix App Key and API Key, turn on the order statuses you want to notify customers about, and Appushy handles the rest: identifying which customer to notify, sending the push, and logging what happened — automatically, every time an order changes status.

**What Appushy does**

* Connects to your Appilix app with your App Key and API Key, and validates them before you rely on them.
* Sends a native push notification when a WooCommerce order reaches a status you've turned on — Processing, Completed, On Hold, Refunded, and more.
* Sends a native push notification automatically when a student enrols in a Tutor LMS course — free, no Pro license needed.
* Sends a native push notification automatically when someone gets a new direct message via Better Messages — free, no Pro license needed.
* Identifies customers automatically, including guest checkouts, so pushes reach the right device without the customer doing anything extra beyond opening the app once.
* Every trigger's notification lives on one screen — Appushy → Push Automation — where you can see, and toggle, exactly what gets sent and when.
* Logs every send attempt (last 100, with automatic pruning after however many days you choose) so you can see what was actually sent, and why a customer who hasn't opened the app yet didn't receive anything.
* Retries automatically for a few minutes when a customer's device isn't registered with Appilix *yet* — a common, expected timing gap right after checkout, not a failure.

**What Appushy needs from you first**

Appilix's Push Notification module requires Firebase to be connected on the Appilix side before any of this works — that's an Appilix-side setup step, not something Appushy can do for you. See "Before you start" in the plugin's own documentation, linked from the Settings screen, for the full checklist (Firebase project, Cloud Messaging enabled, app rebuilt and reinstalled with the new configuration baked in).

**Honest limitations**

* Push notifications reach app installs only — not browser visitors. That's a different technology (browser push), not something this plugin does.
* A customer must have opened your app and been identified at least once before a targeted push can reach their device. Appushy handles the identification automatically once that's happened.
* Delivery depends on Appilix and Firebase Cloud Messaging. Appushy logs that it successfully handed a notification to Appilix's API — not that a specific device actually displayed it.
* The Push Notification API is a paid Appilix module, not available on Appilix's free trial.

This plugin bundles the Plus Jakarta Sans, Instrument Serif, and JetBrains Mono typefaces (SIL Open Font License 1.1) for its setup wizard — see assets/fonts/OFL.txt.

== External Services ==

This plugin connects to the **Appilix** push notification service (https://appilix.com) to send native app push notifications. This is required for the plugin's core functionality — without it, no notification can be sent.

**What is sent, and when:**

* Your Appilix **App Key** and **API Key** (entered by you in Settings) are sent with every request, to authenticate it as coming from your app.
* A **customer identity** — either the customer's email address or their WordPress user ID, depending on which you choose under Settings → Identify customers by — is sent so Appilix can target the notification to the right device. This is sent both when a customer logs in or completes checkout (to register their identity with Appilix) and with every notification (to target it).
* The **notification title and message text**, which may include the customer's first name, the order number, and the order total, substituted into the message. This is sent every time an order reaches a status you've enabled a notification for, and when you use "Send test push."

This data is sent directly from your WordPress server to Appilix's API (`https://appilix.com/api/push-notification` and `https://appilix.com/api/push-notification-token`) — never through any third-party server other than Appilix's own.

Appilix's Terms of Service and Privacy Policy govern how this data is handled once received: https://appilix.com/terms-conditions and https://appilix.com/privacy-policy.

Appushy is not affiliated with or endorsed by Appilix.

**Optional: product update emails.** During first-run setup, you can opt in (unchecked by default) to receive occasional emails about new Appushy features and integrations. If you do, your email address and site URL are sent to a mailing list maintained by the Appushy team (currently a private Google Sheet, recorded via a Google Apps Script endpoint that Appushy operates, hosted on Google's infrastructure: `https://script.google.com/macros/s/AKfycbxtClXj921kGCHnP_FvxO2vMQG1BhOfg05iEFj5hlVu47cW3GyyxdmyYfateG79lSFv/exec`) — used only to send you those update emails, never shared, and only ever sent if you explicitly checked the box. Skipping this has no effect on how Appushy works.

Because this data is processed and stored on Google's infrastructure, it is also subject to Google's Terms of Service and Privacy Policy: https://policies.google.com/terms and https://policies.google.com/privacy.

== Installation ==

1. Upload and activate Appushy like any WordPress plugin, or install it directly from the WordPress Plugin Directory.
2. Works with WooCommerce, Tutor LMS, and/or Better Messages — activate whichever you use; Appushy detects each one automatically and never requires any of them just to install.
3. You'll be taken to a short guided setup wizard automatically after activation. Paste your Appilix App Key and API Key (found in your Appilix dashboard's Push Notification API panel) when prompted, then send a test push to confirm delivery to a real device.
4. Prefer to skip the wizard? Use "Skip setup" on any step to go straight to Appushy → Settings, where you can connect and test manually at any time.
5. Go to Appushy → Push Automation and turn on the order statuses you want to notify customers about.

== Frequently Asked Questions ==

= Do I need a paid Appilix plan? =

Yes. The Push Notification API is a paid Appilix module and is not available on Appilix's free trial. You'll also need Firebase connected on the Appilix side — see "Before you start" in the plugin's documentation.

= Why isn't a customer receiving notifications? =

Almost always because they haven't opened your app and been identified yet. Appushy's log will show "Not delivered — Hasn't opened your app yet" for these — this is the expected, normal outcome for a customer who hasn't used the app, not an error.

= Why do automatic notifications sometimes arrive a minute or so late? =

That's WordPress's own background task scheduling (Action Scheduler), not Appushy or Appilix — by default it only runs when someone visits your site, so on a quiet site a notification can wait briefly for the next page load before it's sent. For instant delivery regardless of traffic, set up a real server cron job instead of WordPress's default (`define( 'DISABLE_WP_CRON', true );` in `wp-config.php`, plus a real cron entry hitting `wp-cron.php` — most hosts support this, and it's the same fix WooCommerce recommends for order-processing timing). Manual sends aren't affected — those go out immediately.

= Does this work for guest checkouts? =

Yes, when identifying customers by email (the default). Appushy registers the order's billing email with Appilix automatically on the order-confirmation page, whether or not the customer has an account.

= Can I customize the notification text? =

Not in the free version — each order status has fixed, pre-written text with variables like the customer's name and order number filled in automatically. A template editor is planned as part of a future paid tier.

= Is my Appilix data safe? =

Your App Key and API Key are never displayed after saving (masked in the UI) and never appear in the notification log. See "External Services" above for exactly what's sent to Appilix and when.

== Screenshots ==

1. Settings — connect your Appilix app and send a test push.
2. Push Automation — see and control every notification WooCommerce can send, in one place.
3. Logs — every send attempt, with a clear explanation for anything that wasn't delivered.

== Changelog ==

= 0.0.1 =
* Initial release.
* Appilix connection: App Key/API Key with Validate.
* WooCommerce order-status push notifications — Push Automation screen, on/off per status.
* Automatic customer identification, including guest checkouts.
* Notification log with configurable retention.
* Automatic retry when a customer's device isn't registered yet.
* Tutor LMS: automatic enrollment push notifications.
* Better Messages: automatic direct-message push notifications.
