CI / Coding Standards (pull_request) Successful in 29s
CI / Tests (PHP 8.2) (pull_request) Successful in 31s
CI / Tests (PHP 8.3) (pull_request) Successful in 31s
CI / Tests (PHP 8.5) (pull_request) Successful in 31s
CI / No Debug Code (pull_request) Successful in 9s
CI / Tests (PHP 8.1) (pull_request) Successful in 44s
CI / Static Analysis (pull_request) Successful in 51s
CI / Build Plugin Zip (pull_request) Skipped
The "Payment due" notice the daily billing scan sends was fixed wording
baked into PaymentDueMailer. Studio admins can now view, edit and preview
its subject and body under Studio Settings -> Payment Due Email.
- PaymentDueEmailTemplate stores subject/body/item-line as us_payment_due_email_*
options, each falling back to the built-in default when blank, and renders
via {token} substitution.
- PaymentDueMailer now builds a token map from the same consolidated
items/credit/e-transfer/reference data and renders the stored template; the
default template reproduces the previous wording exactly.
- PaymentEmailController serves the view/edit/save/reset admin page
(manage_billing, nonce-checked) with a server-rendered sample preview.
- PaymentEmailPreviewEndpoint (POST us-scheduler/v1/payment-email/preview,
manage_billing) + payment-email-admin.js drive a live preview of unsaved edits.
- Submenu wired under Studio Settings; endpoint wired in RestRegistrar.
- Bump to 1.6.0 and add CHANGELOG entry. New options default gracefully, so
existing sites need no migration and send the identical notice until edited.
Co-authored-by: anthropic/claude-opus-4-8
45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Unsupervised Scheduler
|
|
* Plugin URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
|
|
* Description: Instructor/student lesson scheduling for WordPress.
|
|
* Version: 1.6.0
|
|
* Requires at least: 6.2
|
|
* Requires PHP: 8.1
|
|
* Author: Unsupervised
|
|
* Author URI: https://unsupervised.ca
|
|
* License: GPL-2.0-or-later
|
|
* Text Domain: unsupervised-schedular
|
|
* Update URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Unsupervised\Schedular;
|
|
|
|
if (! defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
define('USC_VERSION', '1.6.0');
|
|
define('USC_PLUGIN_FILE', __FILE__);
|
|
define('USC_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
define('USC_PLUGIN_URL', plugin_dir_url(__FILE__));
|
|
define('USC_TABLE_AVAILABILITY', $GLOBALS['wpdb']->prefix . 'us_availability');
|
|
define('USC_TABLE_LESSONS', $GLOBALS['wpdb']->prefix . 'us_lessons');
|
|
|
|
require_once USC_PLUGIN_DIR . 'vendor/autoload.php';
|
|
|
|
register_activation_hook(__FILE__, static function (): void {
|
|
(new Installer())->run();
|
|
});
|
|
|
|
register_deactivation_hook(__FILE__, static function (): void {
|
|
wp_clear_scheduled_hook('us_generate_due_payments');
|
|
flush_rewrite_rules();
|
|
});
|
|
|
|
add_action('plugins_loaded', static function (): void {
|
|
Plugin::boot();
|
|
});
|