Hooks & Filter

Agy provides a couple of useful filters and actions to modify the behavior of the plugin. This docs section is dedicated to developers, so expect a lot of code to read.


By default, Agy supports age restrictions for posts, pages, and products. If you like to extend it to other custom post types you can do that with the filter like so:

Hooks & Filter 1


You can completely overwrite all of the templates of Agy with this filter. Copy the template from plugins/content-warning-v2/src/templates add it to your child theme and use the filter to change the path to the template like so:

Hooks & Filter 2


You may want to use this filter to exclude certain products from the Sofort Ident API verification. This filter is executed each time the verification is triggered. Include a custom logic or disable it for certain products to reduce the number of monthly validation requests.

Hooks & Filter 3