Developer Hooks & Reference
A concise reference of the plugin’s extension points and data contract. For the narrative design of how the pieces fit together, read Architecture first.
The plugin is intentionally small, so the customization surface is small too. Right now there are two filters, a code-level hook list you can extend, and a stable data contract (meta keys, options, AJAX endpoint, and table) that other code can rely on.
Table of Contents
Filters
These are the only apply_filters() extension points in the plugin today. Both
control the per-IP rate limiter on the public signup endpoint.
sscs_rate_limit_max
Maximum number of signup submissions allowed per IP address within the window.
- Type:
int - Default:
5
add_filter( 'sscs_rate_limit_max', function () {
return 10;
} );
sscs_rate_limit_window
Length of the rate-limit window, in seconds.
- Type:
int(seconds) - Default:
600(10 * MINUTE_IN_SECONDS)
add_filter( 'sscs_rate_limit_window', function () {
return 30 * MINUTE_IN_SECONDS;
} );
See Spam & Abuse Protection for how the limiter behaves.
Code-level extension points
Theme hook locations ($known_locations)
The plugin replaces WooCommerce’s add-to-cart output by finding where
woocommerce_template_single_add_to_cart is hooked. It checks a fast list of known
locations first, then falls back to scanning every registered hook. If your theme
uses a non-standard hook and you want to skip the scan, add it to the
$known_locations array in sscs_maybe_replace_add_to_cart()
(super-speedy-coming-soon.php):
$known_locations = array(
array( 'woocommerce_single_product_summary', 30 ), // WooCommerce default
array( 'your_theme_custom_hook', 10 ), // your theme
);
This is a source edit, not a filter — see “Known limitations” below.
Data contract
These names are stable and safe for other code (exports, migrations, integrations) to depend on.
Post meta (per product)
| Meta key | Type | Meaning |
|---|---|---|
_sscs_coming_soon |
'yes' / 'no' |
Master switch for the coming soon display. |
_sscs_arrival_date |
YYYY-MM-DD string |
Countdown target date. |
_sscs_offer_description |
HTML (wp_kses_post) |
Promo text shown above the form. |
_sscs_email_provider |
mailerlite / sse |
Which provider collects signups. |
_sscs_mailerlite_group_id |
string | MailerLite group for this product. |
_sscs_sse_form_id |
int | SSE form ID (when provider is sse). |
Options (global)
| Option | Default | Meaning |
|---|---|---|
sscs_mailerlite_api_key |
'' |
MailerLite API key. |
sscs_honeypot_enabled |
'yes' |
Honeypot toggle. |
sscs_captcha_enabled |
'no' |
Turnstile toggle. |
sscs_turnstile_site_key |
'' |
Turnstile public key. |
sscs_turnstile_secret_key |
'' |
Turnstile secret key. |
Database table — {$wpdb->prefix}sscs_signups
| Column | Type | Notes |
|---|---|---|
id |
BIGINT UNSIGNED |
PK, auto-increment. |
email |
VARCHAR(255) |
UNIQUE. |
mailerlite_id |
VARCHAR(255) |
Subscriber ID from MailerLite. |
referrer_id |
VARCHAR(255) |
Referring subscriber’s MailerLite ID. |
wp_user_id |
BIGINT UNSIGNED |
Logged-in user, if any. |
created_at |
TIMESTAMP |
Defaults to now. |
Created on activation via register_activation_hook → sscs_create_custom_table().
AJAX endpoint
- Action:
sscs_ajax_signup(registered for bothwp_ajax_andwp_ajax_nopriv_). - Nonce: action
sscs_signup_nonce, sent in thenoncePOST field. - Expected POST fields:
email,post_id,name(honeypot — must be empty),shared_by(optional referral ID),cf_token(Turnstile token, when enabled). - Response:
wp_send_json_success/wp_send_json_errorwith amessage; the success payload also includesmailerlite_id.
The nonce is served to logged-out visitors via
wp_localize_script, so it is not an abuse control on this public endpoint — the honeypot, rate limit, and optional CAPTCHA are. Don’t rely on the nonce for security here.
Helper functions
Useful predicates if you’re extending behaviour:
sscs_honeypot_enabled(): boolsscs_captcha_enabled(): bool— true only when the toggle is on and both Turnstile keys are set.sscs_check_rate_limit(): bool—falsewhen the caller is over the limit.sscs_verify_turnstile(): boolsscs_add_subscriber_to_mailerlite( string $email, string $group_id ): string— returns the MailerLite subscriber ID (or'').
Localized JS object (sscs_ajax)
Available on coming soon product pages: ajax_url, nonce, post_id,
arrival_date, captcha (1/0).
Known limitations / extension requests
These are deliberate notes for future work — extension points that would be useful but do not exist yet:
- No template-override filter.
sscs_render_coming_soon_template()includestemplates/sscs-coming-soon-template.phpdirectly from the plugin folder, with nolocate_template()lookup or filter on the path. Themes can’t override the markup without editing the plugin. Asscs_template_pathfilter (or alocate_template()fallback) would fix this. - No action hooks. There are no custom
do_action()points (e.g. around a successful signup), so you can’t currently fire your own code after a signup without intercepting the AJAX action. Ado_action( 'sscs_after_signup', $email, $product_id, $mailerlite_id )would be a natural addition. - No template override for the SSE branch beyond what SSE itself provides.
If you need any of these, they’re tracked as candidate enhancements.
- Architecture — how these pieces fit together.
- Spam & Abuse Protection — the rate-limit filters in context.