Tropratik Shop Guardian

By tropratik

0+ active installationsVersion 0.1.0

Automatically disables purchases on your WooCommerce store if you are no longer able to confirm your presence.

Description

Tropratik Shop Guardian is a failsafe for sole proprietors running a WooCommerce store. If you cannot confirm your presence within a period you define, purchases are automatically disabled so that you never accept orders you cannot fulfil.

How it works

  1. You confirm your presence simply by logging in to your WordPress admin.
  2. If nobody has confirmed for a while, reminders are sent by e-mail, then repeated until someone confirms.
  3. If the delay ends without any confirmation, purchases are disabled and visitors see a public message.
  4. As soon as a recipient logs in to the admin, the store reopens and a new full delay starts.

Features

  • Presence monitoring with a delay of 2 to 365 days (7 by default), a first reminder before the end of the delay (2 days by default) and a repeat every 1 to 72 hours (6 by default).
  • Reminders by e-mail to all administrators and shop managers, each in the language of the recipient when a translation is available. You can exclude users from the reminders.
  • Backup contact: an extra e-mail address that is alerted without any confirmation link.
  • Vacation mode: schedule a closure with a start and an end date, close the store immediately until a date, or end it early. It has its own public message, and the presence countdown is paused while it lasts.
  • Every purchase path is covered: classic checkout, block checkout and the Store API, payment of an existing order, express payment buttons, and order creation through the REST API.
  • Reversible and non destructive: your payment gateway settings are never changed. The plugin only filters at run time, so reopening the store simply removes the filter.
  • Compatible with High-Performance Order Storage and the block-based cart and checkout.
  • Public messages that you can edit, with basic HTML allowed.
  • Ready for translation: every text is translatable, and translations are managed on translate.wordpress.org.

The settings are under WooCommerce > Shop Guardian.

This plugin does not contact any external service and does not collect any data.

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory, or install it through the WordPress Plugins screen.
  2. Activate the plugin through the “Plugins” screen in WordPress.
  3. WooCommerce must be installed and active.

FAQ

Does this plugin require WooCommerce?

Yes. WooCommerce must be installed and active.

How do I confirm my presence?

Log in to your WordPress admin. Browsing the admin counts too, but background requests (AJAX, Heartbeat, scheduled tasks) do not. Only users who receive the reminders can confirm: a user excluded from the reminders cannot.

Who receives the reminders?

By default all administrators and shop managers. A new administrator or shop manager receives them automatically. You can exclude users in the settings, but at least one person must remain: a user who is not excluded, or the backup contact. Only administrators can exclude administrators.

What is blocked while the store is closed?

Adding to the cart, the classic and block checkout, payment of an existing order and the creation of orders by the REST API. The payment gateways are hidden at run time and any order creation is refused with the public message. Browsing the store and the admin stays possible.

Does it change my payment gateway settings?

No. Nothing is modified or deleted in the settings of WooCommerce or of your gateways. When the store reopens, the plugin simply stops filtering.

Does page caching matter?

The state of the store is checked on the server for every purchase request (adding to the cart, checkout, payment, REST API), so a page kept in a cache cannot let an order through. A cached page can still show the previous public message for a while: if your cache plugin stores shop pages, empty it after a long closure or reopening, and keep the cart and checkout pages out of the cache (WooCommerce already asks for this).

Are orders created through the WooCommerce REST API blocked too?

Yes. While the store is closed, creating an order through the REST API (v1, v2 and v3, batch requests included) is refused with an HTTP 503 error and the code tropratik_sg_closed. Updating existing orders is not affected. An integration that must keep creating orders (for example an ERP or a marketplace import) can opt out with the tropratik_sg_allow_rest_order_creation filter:

add_filter( 'tropratik_sg_allow_rest_order_creation', '__return_true' );

What is the difference between the vacation mode and the presence monitoring?

The presence monitoring closes the store when nobody confirms. The vacation mode closes it on purpose, from a schedule or immediately until a date you choose, and you can end it early. The presence countdown is paused during the vacation and resumes where it stopped. Ending the vacation never reopens a store suspended by the presence monitoring: only a presence confirmation does.

Which languages are available?

English by default. Every text is translatable and translations are provided by the community on translate.wordpress.org. The e-mails are sent in the language of each recipient when a translation is available and that language is installed on the site, otherwise in the language of the site.

Does it work on multisite or on a marketplace with several vendors?

Not in this version. One WordPress installation is one store.

What happens if I deactivate or delete the plugin?

The protection only exists while the plugin is active. If you deactivate it, no code of the plugin runs any more and the store accepts orders again, even if it was suspended or in vacation mode. Deleting the plugin removes its settings and scheduled tasks. To pause sales on purpose, use the vacation mode instead of deactivating the plugin.

Changelog

0.1.0

  • Initial release.
  • Presence monitoring with e-mail reminders, an optional backup contact and automatic suspension of the purchases.
  • Vacation mode with a schedule, an immediate start and an early end.
  • Blocking of every purchase path, including the REST API, with a public message shown on the store pages.
  • Ready for translation through translate.wordpress.org.