Initial commit of WooNooW Docs
This commit is contained in:
27
contents/docs/hooks/index.mdx
Normal file
27
contents/docs/hooks/index.mdx
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Hooks Overview
|
||||
description: Overview of Actions and Filters available in WooNooW
|
||||
date: 2024-01-31
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
WooNooW provides a rich set of actions and filters allowing developers to customize almost every aspect of the plugin without modifying core files.
|
||||
|
||||
### Hook Categories
|
||||
|
||||
* [Notifications](/docs/hooks/notifications) - Customize email templates, subjects, and channels.
|
||||
* [Subscriptions](/docs/hooks/subscriptions) - Intercept payment logic and modify gateway behavior.
|
||||
* [Frontend & checkout](/docs/hooks/frontend) - Adjust checkout fields and SSR caching.
|
||||
* [Newsletter](/docs/hooks/newsletter) - Subscribe/unsubscribe events.
|
||||
|
||||
### Usage Example
|
||||
|
||||
```php
|
||||
add_filter('woonoow_email_default_subject', function($subject, $recipient, $event) {
|
||||
if ($event === 'subscription_renewal') {
|
||||
return 'Your subscription is renewing soon!';
|
||||
}
|
||||
return $subject;
|
||||
}, 10, 3);
|
||||
```
|
||||
Reference in New Issue
Block a user