# Edwiser Bridge Filter Hooks

| **Filter Hooks**                           | **Description**                                                                                                                                                                           | **Parameters**                                                                                                                                                                                                                                                                             |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **eb\_create\_default\_pages**             | Use this hook to create pages on plugin activation.                                                                                                                                       | –                                                                                                                                                                                                                                                                                          |
| **eb\_new\_user\_data**                    | Use this hook to add custom data to a user’s profile when an account is created on WordPress.                                                                                             | $userdata                                                                                                                                                                                                                                                                                  |
| **eb\_unique\_moodle\_username**           | Use this hook to filter the username used when a new account is created for a user on Moodle™.                                                                                            | $username: Username already generated by the system for a user.                                                                                                                                                                                                                            |
| **eb\_filter\_moodle\_password**           | The password is randomly generated if a user with an existing WordPress account is linked to Moodle. Using this filter a custom password can be set for user accounts.                    | $random\_password                                                                                                                                                                                                                                                                          |
| **eb\_moodle\_user\_profile\_details**     | Use this filter to transfer additional profile field data from WordPress to Moodle.                                                                                                       | <p>$userdetails: Profile details to be passed to Moodle for a user.<br>$update: To know if an existing user’s profile is being updated or a new account is created on Moodle.<br>$userdetails: In case of the profile being updated array should contain the moodle user id of a user.</p> |
| **eb\_taxonomy\_args\_eb\_course\_cat**    | Use this filter to modify arguments passed when creating course category taxonomy.                                                                                                        | –                                                                                                                                                                                                                                                                                          |
| **eb\_register\_post\_type\_courses**      | Use this filter to modify arguments passed when creating a Moodle course post type                                                                                                        | –                                                                                                                                                                                                                                                                                          |
| **eb\_register\_post\_type\_order**        | Use this filter to modify arguments passed when creating the course order post type.                                                                                                      | –                                                                                                                                                                                                                                                                                          |
| **eb\_post\_options**                      | This hook can be used to modify existing custom options added to post types or to add new fields.                                                                                         | –                                                                                                                                                                                                                                                                                          |
| **eb\_course\_login\_button**              | Use this filter hook to modify the ‘*Take this Course*’ button displayed to non-logged in users.                                                                                          | <p>$login\_button<br>$login\_url</p>                                                                                                                                                                                                                                                       |
| **eb\_course\_access\_button**             | Use this filter hook to modify the ‘*Access Course*’ button displayed on a single course page.                                                                                            | <p>$access\_button<br>$access\_params: Parameters that can be used to modify the button.</p>                                                                                                                                                                                               |
| **eb\_course\_closed\_button**             | Use this filter hook to modify the ‘*Take this Course*’ button displayed for courses where the course price type is closed.                                                               | <p>$closed\_button<br>$closed\_params: Parameters that can be used to modify the button.</p>                                                                                                                                                                                               |
| **eb\_course\_free\_button**               | Use this filter hook to modify the ‘*Take this Course*’ button displayed for courses where course price type is free.                                                                     | <p>$free\_button<br>$course id</p>                                                                                                                                                                                                                                                         |
| **eb\_course\_payment\_button**            | Use this filter hook to modify the ‘*Take this Course*’ button displayed for courses where the price is defined.                                                                          | <p>$paypal\_button<br>$payment\_params: The parameters passed are course id and price.</p>                                                                                                                                                                                                 |
| **eb\_course\_not\_purchasable\_notice**   | Use this filter to display custom notice for courses that cannot be purchased. (This can happen if PayPal details are not entered in plugin settings or if course price type is not set.) | –                                                                                                                                                                                                                                                                                          |
| **eb\_get\_template**                      | Use this hook to allow external plugins to filter plugin template files from their own plugin.                                                                                            | –                                                                                                                                                                                                                                                                                          |
| **eb\_login\_redirect**                    | Use this filter to redirect the user to a custom location after login.                                                                                                                    | <p>$redirect: Default redirection URL<br>$user: Current Logged in User.</p>                                                                                                                                                                                                                |
| **eb\_registration\_redirect**             | Use this filter to redirect the user to a custom location after registration.                                                                                                             | <p>$redirect: Default redirection URL<br>$user: Current Logged in User.</p>                                                                                                                                                                                                                |
| **eb\_get\_settings\_pages**               | Use this filter to include the custom settings page class to define the custom plugin settings page.                                                                                      | $settings: Array of registered settings classes.                                                                                                                                                                                                                                           |
| **ed\_filter\_email\_parameters**          | Use this filter to add custom parameters to emails being sent.                                                                                                                            | <p>$args: Existing parameters.<br>$tempalte\_name: Name of email template to identify which email is being sent.</p>                                                                                                                                                                       |
| **eb\_email\_headers**                     | Use this filter to add custom email headers for all emails being sent.                                                                                                                    | –                                                                                                                                                                                                                                                                                          |
| **eb\_new\_user\_email\_subject**          | Use this filter to modify email subject for email sent on user registration.                                                                                                              | –                                                                                                                                                                                                                                                                                          |
| **eb\_existing\_wp\_user\_email\_subject** | Use this filter to modify email subject for email sent on linking an existing WordPress account with a new moodle user account.                                                           | –                                                                                                                                                                                                                                                                                          |
| **eb\_order\_completion\_email\_subject**  | Use this filter to modify email subject for email sent on order completion.                                                                                                               | –                                                                                                                                                                                                                                                                                          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://remui-docs.edwiser.org/edwiser-bridge/edwiser-bridge-filter-hooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
