AffiliateX 2.3.11 has 4 actions and 16 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when AffiliateX fires an action
add_action( 'affiliatex_free_loaded', function() {
// Your code runs here.
}, 10, 1 );
// Change a value AffiliateX is about to use
add_filter( 'affiliatex_post_for_stylesheet', function( $this_post ) {
// Change $this_post here.
return $this_post;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the post to build stylesheet for. */ apply_filters( 'affiliatex_post_for_stylesheet', $this_post ); -
affiliatex_button_url
filterapply_filters( 'affiliatex_button_url', esc_url( do_shortcode( $settings['buttonURL'] ) ) ); -
apply_filters_deprecated( 'ab_typography_google_fonts_source', array( null ), '1.3.9', 'affiliatex_typography_google_fonts_source', 'Please use affiliatex_typography_google_fonts_source instead.' ); -
affiliatex_admin_features
filterapply_filters( 'affiliatex_admin_features', array() ); -
apply_filters( 'affiliatex_block_settings_defaults', array( 'buttons' => true, 'prosAndCons' => true, 'cta' => true, 'notice' => true, 'verdict' => true, 'singleProduct' => true, 'specifications' => true, 'versusLine' => true, 'singleProductProsAndCons' => true, 'productImageButton' => true, 'singleCoupon' => true, 'couponGrid' => true, 'productTabs' => true, 'couponListing' => true, 'topProducts' => true, 'versus' => true, 'productTable' => true... ); -
apply_filters( 'affiliatex_customization_settings_defaults', array( 'typography' => array( 'family' => 'Default', 'variation' => 'n4', 'size' => array( 'desktop' => '18px', 'mobile' => '18px', 'tablet' => '18px', ), 'line-height' => array( 'desktop' => '1.65', 'mobile' => '1.65', 'tablet' => '1.65', ), 'letter-spacing' => array( 'desktop' => '0em', 'mobile' => '0em', 'tablet' => '0em', ), 'text-transform' => 'none', 'text-decoration' => 'none', ), 'fontC... ); -
affiliatex_free_loaded
actiondo_action( 'affiliatex_free_loaded' ); -
affiliatex_fs_loaded
actiondo_action( 'affiliatex_fs_loaded' ); -
affiliatex_get_block_css
filterapply_filters( 'affiliatex_get_block_css', $css, $name, $blockattr, $block_id ); -
affiliatex_get_block_fonts
filterapply_filters( 'affiliatex_get_block_fonts', $block_fonts, $name, $blockattr ); -
affiliatex_is_pro_install
filterapply_filters( 'affiliatex_is_pro_install', false ); -
affiliatex_scan_complete
actiondo_action( 'affiliatex_scan_complete', $total ); -
apply_filters( 'affiliatex_typography_font_sources', array( 'system' => array( 'type' => 'system', 'families' => $this->get_system_fonts(), ), 'google' => array( 'type' => 'google', 'families' => $this->get_googgle_fonts(), ), ) ); -
apply_filters( 'affiliatex_typography_google_fonts_source', $maybe_custom_source ); -
apply_filters( 'affiliatex_typography_google_use_remote', true ); -
apply_filters( 'affiliatex_widgets_before_init', array( 'affiliatex/buttons' => ButtonWidget::class, 'affiliatex/cta' => CtaWidget::class, 'affiliatex/notice' => NoticeWidget::class, 'affiliatex/product-comparison' => ProductComparisonWidget::class, 'affiliatex/product-table' => ProductTableWidget::class, 'affiliatex/pros-and-cons' => ProsAndConsWidget::class, 'affiliatex/single-product' => SingleProductWidget::class, 'affiliatex/specificatio... ); -
before_affiliatex_init
actiondo_action( 'before_affiliatex_init' ); -
is_affiliatex_block
filterapply_filters( 'is_affiliatex_block', $affx_block ); -
plugin_locale
filterapply_filters( 'plugin_locale', $locale, 'affiliatex' ); -
post_has_affiliatex_items
filterapply_filters( 'post_has_affiliatex_items', self::is_affiliatex_block() || self::has_elementor_widgets() );
Generated from AffiliateX's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: