Get Started
Available hooks and filters in Product Feed Pro - AdTribes
  1. Home
  2. Knowledge Base
  3. Customization
  4. Available hooks and filters in Product Feed Pro

Available hooks and filters in Product Feed Pro

Product Feed Pro fires a large set of WordPress action and filter hooks throughout feed creation, feed generation, and the admin screens. Use them to add your own fields to the feed editor, change what data goes into a feed, or extend the plugin’s admin UI without editing plugin files directly.

This is a developer reference. It assumes you’re comfortable adding code through a custom plugin or your theme’s functions.php. If you’re new to WordPress hooks, read the WordPress Plugin Handbook on hooks first.

Also, Product Feed Elite and other AdTribes add-ons rely on many of the same hooks to extend Product Feed Pro. Where a hook exists specifically so an add-on can plug into core behaviour, that’s noted below.

How hooks fit into the feed pipeline

A feed generation run has three stages: the plugin resolves the feed’s settings and starts a batch of products, it loops over products and builds each one’s data row, then it writes the finished rows to the feed file and wraps up. Hooks under Feed generation and batch processing and most of the Product data and feed output filters fire during the middle stage, once per product or once per batch. Hooks under Edit feed wizard and Admin pages, settings, and notices fire only when someone is using the WordPress admin (creating, editing, or managing a feed), not during a scheduled feed refresh. Keep this in mind when picking a hook: a filter that changes one product’s data only affects future feed generations, while an action tied to the Edit Feed screen only runs when a person is actively working in that screen.

Actions

Actions are hooks that WordPress runs at specific points during execution, or when specific events occur.

Admin pages, menus, and notices

HookDetail
adt_pfp_help_menu_itemsFires at the end of the Help dropdown menu in the plugin’s admin header, after the built-in Resources links. Lets Elite and other add-ons append their own Help menu items. Because the header renders on every Product Feed admin page, your callback needs to scope its own output to the pages where it should appear.
adt_license_page_enqueue_scriptsFires at the end of the License page’s script enqueueing, letting add-ons enqueue their own scripts or styles on that screen.
adt_license_page_contentFires inside the License page’s tab content area. Receives the active tab ID and the full list of registered tabs, so each add-on can render its own tab content only when its tab is active.
adt_pfp_settings_page_tab_contentFires after the built-in Settings page tab content renders, letting other code append content for the active tab, including a custom tab not built into Product Feed Pro.
adt_pfp_settings_page_export_import_tab_contentFires at the end of the Settings → Export/Import tab, after the built-in “overwrite existing feeds” option, for add-ons that want to add their own export/import controls.
adt_edit_feed_tab_contentFires after the built-in Edit Feed tab content template renders, letting other code append content for the active tab.
adt_pfp_manage_feeds_before_titleFires inside the Manage Feeds page wrapper, above the page title.
adt_pfp_manage_feeds_after_titleFires immediately next to the “Manage Feeds” page title, for injecting content beside the heading.
adt_manage_feeds_table_row_actionsFires inside the Actions cell of each row in the Manage Feeds table. Receives the feed object for that row, so add-ons can append their own per-feed action links.
adt_pfp_after_display_admin_notice_genericFires immediately after a generic Product Feed admin notice renders, letting you append extra markup after it.
adt_pfp_notice_updatedFires after an admin notice’s stored value changes, for example when a user dismisses or snoozes it.
adt_pfp_before_dismiss_admin_noticeFires at the start of the “dismiss admin notice” AJAX handler, before the notice’s stored value updates.
adt_after_register_adt_product_feed_post_typeFires right after the plugin registers its internal adt_feed custom post type, so other code can safely rely on the post type already being available.
adt_after_migrate_to_custom_post_typeFires after the one-time migration of legacy feed data into the adt_feed custom post type finishes, triggered from the Settings page.
adt_after_install_activate_pluginFires after the setup checklist’s “install and activate” AJAX handler attempts to download and activate a sister plugin. Receives the requested plugin slug and the install result.

Feed lifecycle: create, clone, delete, and cancel

HookDetail
adt_create_product_feed_before_saveFires right before a newly created feed is saved, when a feed is created through the legacy create-feed flow. This is your last chance to change the feed object before it’s written to the database.
adt_clone_product_feed_before_saveFires just before a cloned feed is saved, across every place a feed can be duplicated (the single clone action, the bulk duplicate action, WP-CLI, and the Abilities API). Receives the in-memory clone and the original feed it was cloned from.
adt_after_clone_product_feedFires right after a cloned feed has been saved and its refresh schedule registered, across the same clone entry points as adt_clone_product_feed_before_save.
adt_before_delete_product_feedFires immediately before a feed is deleted, before its data is destroyed. Fires the same way from the admin UI, WP-CLI, and the Abilities API.
adt_after_delete_product_feedFires immediately after a feed has been deleted, from the same entry points as adt_before_delete_product_feed.
adt_before_cancel_product_feedFires immediately before an in-progress feed’s run state resets and its status changes to Stopped.
adt_after_cancel_product_feedFires right after a feed’s processing has been cancelled, saved, and its stats-update task queued.

Edit feed wizard: tab processing

Each tab of the Edit Feed screen fires a pair of hooks when its form is submitted: a filter you can use to change what gets saved, and an action that fires right after it’s saved. All of them also fire from the equivalent Abilities API action where one exists.

HookDetail
adt_after_process_general_tab_formFires after the General tab’s settings save. Receives the saved feed, the properties that were applied, and a copy of the feed as it was before the change.
adt_after_process_filters_rules_tab_formFires after the legacy combined Filters & Rules tab saves (only relevant on sites still using the adt_use_legacy_filters_and_rules setting).
adt_after_process_filters_tab_formFires after the Filters tab saves.
adt_after_process_rules_tab_formFires after the Rules tab saves.
adt_after_process_field_mapping_tab_formFires after the Field Mapping tab saves.
adt_after_process_category_mapping_tab_formFires after the Category Mapping tab saves.
adt_after_process_conversion_analytics_tab_formFires after the Conversion & Analytics tab’s UTM settings save.
adt_process_tab_formFires as a fallback when the submitted tab doesn’t match any of Product Feed Pro’s built-in tabs, letting Elite or other add-ons handle form processing for their own custom tabs.

Edit feed wizard: template injection points

HookDetail
adt_before_product_feed_manage_pageFires near the top of every tab in the Edit Feed wizard, before that tab’s content renders. Receives a $step number that tells you which tab is currently active (0 for General, 1 for Category Mapping, 4 for Filters & Rules, 5 for Conversion & Analytics, 7 for Field Mapping), so your callback can target a specific tab.
adt_general_feed_settings_before_country_fieldFires on the General tab, just before the Country field row.
adt_general_feed_settings_after_shipping_countriesFires on the General tab, immediately after the “Include all shipping countries” row. This is new in Product Feed Pro 13.5.7. It’s how Product Feed Elite adds its “Show only the cheapest shipping method per country” toggle, which makes it a proven spot for adding your own row to the General tab.
adt_general_feed_settings_after_refresh_intervalFires on the General tab, right after the Refresh interval row.

Feed generation and batch processing

HookDetail
woosea_before_get_productsFires once per feed generation batch, right after the feed’s attributes, rules, and filters are resolved and just before the plugin starts querying products.
adt_before_yandex_create_xml_feedFires immediately before the plugin builds the root XML structure for a Yandex-format feed.
adt_before_product_feed_batch_processingFires right before each batch of products is processed during feed generation. Receives the feed ID, the current offset, and the batch size about to run.
adt_after_product_feed_generationFires after an entire feed generation run finishes and the final feed file is in place. A good hook for post-generation tasks like notifications or cache purging.

Filters

Filters are hooks that modify data before it’s used, whether that’s a value shown in the admin, a query, or data written to the feed file.

Filters and rules engine

Product Feed Pro’s Filters and Rules tabs let a store owner include, exclude, or transform products based on conditions. These filters extend that engine.

HookDetail
adt_pfp_get_filters_rules_conditionsFilters the list of comparison conditions available when building a filter or rule (for example “Contains”, “Between”), letting you add your own condition types to the dropdown.
adt_pfp_evaluate_filters_rules_conditionLets you resolve a custom condition type that the plugin’s own condition list doesn’t handle, when a filter or rule evaluates a product. Return true or false to resolve it, or pass through the incoming null to fall back to the plugin’s default (unhandled conditions pass by default). Use this together with adt_pfp_get_filters_rules_conditions. Registering a condition in the dropdown without also handling it here leaves the condition doing nothing when a feed runs.
adt_pfp_get_filters_rules_attributesFilters the grouped list of attributes offered in the Filters and Rules builder’s dropdowns. Receives the attribute list, the feed’s channel, whether you’re building a filter or a rule, and the feed itself (null for a feed that hasn’t been saved yet).
adt_pfp_get_rules_actionsFilters the list of actions available in a Rule’s “then” dropdown (like “Set value” or “Combine fields”), letting you register your own rule actions.
adt_pfp_apply_rule_actionsFilters a product’s feed data after a rule’s configured actions have been applied to it.
adt_pfp_process_rules_actionFilters a product’s feed data after a single rule action is processed, inside the loop that runs each action in turn.
adt_pfp_filter_product_feed_dataFilters a product’s final feed data after the feed’s Filters have run. This also fires from the legacy Filters engine and, twice, from the Google Product Review feed builder.
adt_pfp_maybe_skip_filterFilters whether one specific legacy filter rule should be skipped entirely, on sites still using the legacy Filters engine.
adt_pfp_filter_passed_product_feedFilters whether a product passed all of the feed’s legacy filter rules overall.

Product data and feed output

HookDetail
adt_get_product_dataFilters the complete data array for a single product, right before it’s passed to the Filters and Rules engine and then to the feed file. This is the main hook for changing anything about how a product appears in a feed.
adt_feed_get_attributesFilters the feed’s configured attribute mapping list, both at the start of feed generation and again per product during value calculation.
adt_product_feed_get_products_query_argsFilters the full WP_Query arguments used to fetch the batch of products for feed generation.
adt_product_feed_get_product_idFilters the product ID being processed for the current item in the loop, right before the plugin loads the product object.
adt_product_feed_filter_catalog_visibilityFilters the list of catalog visibility values that should exclude a product from the feed.
adt_product_data_availability_formatFilters the final availability value (like “in stock” or “out of stock”) for a product, after the plugin’s own channel-specific mapping has run.
adt_product_feed_data_rounded_price_number_of_decimalsFilters the number of decimal places used when the plugin computes rounded price variants for a product.
adt_product_feed_data_rounded_price_precisionsFilters the rounding precision passed to PHP’s round() for those rounded price variants.
adt_product_feed_data_rounded_price_modeFilters the PHP rounding mode constant (for example PHP_ROUND_HALF_UP) used for rounded price variants.
adt_product_feed_installment_currencyFilters the currency code used when building a product’s “buy now, pay later” installment text.
adt_merkandi_pricing_tiersFilters in a list of quantity-based pricing tiers for a Merkandi-format product, for wholesale or quantity-pricing integrations. When this returns a non-empty array, the plugin renders a pricing block instead of a flat price.
adt_pfp_google_shopping_feed_channel_linkFilters the site link written into the header of a Google Shopping-format feed file.
adt_pfp_feed_channel_linkFilters the channel-level link element for the Yandex, Zap.co.il, Salidzini.lv, and Pinterest RSS Board feed formats.
adt_product_feed_csv_headerFilters the header row string right before it’s written as the first line of a CSV or TXT-format feed.
adt_product_feed_csv_row_dataFilters the array of values that make up a single CSV or TXT row, right before it’s written to the feed file.
adt_product_feed_jsonl_productFilters a single product’s data before it’s added to the batch, for JSONL and JSONL.GZ format feeds only.
adt_product_feed_preview_productsFilters the target number of products to include when a feed is generated in preview mode (defaults to 5).
adt_product_feed_preview_batch_sizeFilters the query batch size used while repeatedly querying products in preview mode until the target count is reached.
adt_product_feed_preview_max_queriesFilters the maximum number of batched queries preview mode runs before giving up.
adt_product_feed_utm_code_arrayFilters the array of Google Analytics UTM parameters before they’re assembled into a query string and appended to a product’s feed link.
adt_product_feed_append_utm_codeFilters the final assembled UTM query string, right before it’s appended to a product’s feed link.

Adaptive batch sizing

New in Product Feed Pro 13.5.7. Instead of a fixed number of products per batch, the plugin can now size each batch automatically based on how long the previous batch took and how much memory it used. These filters give you control over that behaviour.

HookDetail
adt_product_feed_adaptive_batch_enabledFilters whether adaptive batch sizing is used at all for a feed (defaults to enabled, unless the user has manually pinned a batch size in the feed’s settings). Return false to revert that feed to the old fixed-size behaviour without changing any settings. This is the filter to reach for first when diagnosing whether adaptive sizing is involved in a feed generation problem.
adt_product_feed_batch_sizeFilters the starting batch size for a feed, before adaptive sizing takes over for later batches.
adt_product_feed_batch_time_budgetFilters the per-batch time budget, in seconds, that adaptive sizing aims to stay under.
adt_product_feed_memory_limit_bytesFilters the memory ceiling, in bytes, used by the adaptive sizing memory guard. Returning 0 disables the memory guard.
adt_product_feed_adaptive_next_batch_sizeFilters the size the plugin calculated for the next batch, giving you the final say over the adapted value.
adt_product_feed_memory_warning_thresholdFilters the memory threshold, in bytes, that triggers a low-memory warning in the logs during batch processing (only fires when logging is enabled).

Export and import

HookDetail
adt_pfp_export_feed_data_propertiesFilters the list of feed property keys included when a feed is exported through the Export/Import tool. New in Product Feed Pro 13.5.7, so an add-on can register its own feed properties and have them round-trip through export and import. Any property a feed doesn’t actually have is skipped safely.
adt_tools_action_import_feedsFires an action, not a filter, when a user clicks Import Feeds in the Export/Import tool. Product Feed Pro itself doesn’t include import logic, so Elite and other add-ons hook here to perform the actual import.
adt_update_version_13_3_5_before_save_feedFilters a feed object during the one-time upgrade routine that migrated legacy cron-based feeds into the current feed post type. Only relevant if you’re customizing that historical migration path.

Shipping data

HookDetail
adt_product_feed_shipping_cost_currencyFilters the currency code used when calculating shipping cost for a feed.
adt_product_feed_shipping_product_priceFilters the product price used as the base for shipping rate calculations.
adt_product_feed_shipping_dataFilters the complete shipping data array for a product, the final output of the shipping data pipeline.
adt_product_feed_shipping_countriesFilters the resolved list of countries for shipping zones set to “Everywhere”.
adt_product_feed_shipping_packageFilters the synthetic shipping package built internally before it’s passed to WooCommerce’s rate calculation.
adt_product_feed_shipping_arrayFilters a single shipping method entry before it’s added to a product’s shipping data. Fires once per rate, both for regular shipping methods and for local pickup.
adt_apply_shipping_taxFilters whether tax is applied on top of the calculated shipping cost.
adt_product_feed_convert_shipping_costFilters the raw shipping cost value before it’s formatted for the feed.
adt_product_feed_shipping_cost_localize_price_argsFilters the arguments used when formatting the shipping cost into its final display string.
adt_product_feed_has_free_shipping_couponA short-circuit filter that lets you override the plugin’s own detection of an active free-shipping coupon, used when evaluating Free Shipping rules. Return true or false to override, or null to let the plugin run its own check.

Pricing, currency, and formatting

HookDetail
adt_product_data_currencyFilters the currency code used when building a product’s feed data.
adt_product_feed_currencyFilters the currency code used to resolve {{CURRENCY}} placeholders on the Field Mapping tab.
adt_pfp_localize_prices_dataFilters a product’s feed data after its price fields have been localized for display.
adt_product_feed_localize_price_argsFilters the arguments passed to WooCommerce’s price formatting when localizing a price for feed output.
adt_pfp_format_dateFilters the final formatted date string used in feed output, after any channel-specific date formatting has already run.
adt_format_refresh_interval_manage_feeds_tableFilters the refresh interval labels (like “Hourly”) shown in the Manage Feeds table.
adt_product_feed_refresh_interval_labelsFilters the same kind of refresh interval labels, used by a different part of the admin UI.
adt_product_feed_refresh_interval_optionsFilters the list of refresh interval choices offered in the General tab’s dropdown.

Categories, attributes, and field mapping

HookDetail
adt_pfp_get_categories_dropdown_argsFilters the get_terms() arguments used to build the product category dropdown in the Filters and Rules builder.
adt_pfp_get_categories_dropdownFilters the list of category terms returned for that same dropdown, after the query runs.
adt_product_feed_attributesFilters the master list of standard attributes available for field mapping.
adt_product_feed_dynamic_attributesFilters the list of custom-taxonomy-based attributes offered in the field mapping UI.
adt_product_feed_custom_attributesFilters the list of custom (non-taxonomy) product attributes offered for field mapping, cached for 24 hours.
adt_product_feed_field_mapping_prefix_replaceFilters the placeholder replacement map (like {{CURRENCY}}) used to resolve tokens in a field mapping row’s Prefix value.
adt_product_feed_field_mapping_suffix_replaceFilters the same kind of replacement map for a field mapping row’s Suffix value.

Orders and sales lookback

HookDetail
adt_total_product_orders_lookback_todayFilters the reference “today” date used when computing the order lookback window for the Total product orders attribute.
adt_total_product_orders_lookback_today_limitFilters the earliest date boundary used to query which orders count toward that lookback.
adt_total_product_orders_lookback_allowed_productsFilters the final list of product and variation IDs considered “recently ordered” for that feature.
adt_variation_total_sales_enable_cacheFilters whether the plugin caches a variation’s total sales count.
adt_variation_total_sales_cache_expirationFilters how long, in seconds, that cached total sales value is kept.
adt_invalidate_variation_sales_cache_idsFilters which variation IDs have their cached total sales value cleared when an order’s status changes.

Admin pages, settings, and notices

HookDetail
adt_pfp_admin_capabilityFilters the WordPress capability required to access every Product Feed Pro admin page (defaults to manage_options). Applied consistently across every admin page class, so changing it in one place changes access everywhere.
adt_manage_product_feed_allowed_rolesFilters an additional list of user roles, beyond the capability check above, allowed to manage feeds.
adt_license_page_tabsFilters the tabs shown on the License admin page. Product Feed Pro itself adds no tabs, so Elite and other add-ons register their license tabs here.
adt_pfp_settings_page_tabsFilters the list of tabs on the Settings admin page.
adt_general_settings_argsFilters the field definitions rendered on the Settings page’s General tab.
adt_settings_other_settings_argsFilters the field definitions for the Settings page’s “Other settings” tab.
adt_admin_plugin_page_titleFilters the page title of the top-level “Manage Feeds” admin page.
adt_admin_plugin_menu_titleFilters the label text of the plugin’s top-level admin menu item (shown as “Product Feed” in the WordPress sidebar).
adt_pfp_feed_polling_intervalFilters how often, in milliseconds, the Manage Feeds page polls the server for feed generation status updates.
adt_manage_feeds_row_actionsFilters the row action links (Refresh, Cancel, Delete, and so on) shown for each feed in the Manage Feeds table.
adt_edit_feed_get_tabsFilters the set of tabs shown on the Edit Feed screen.
adt_update_temp_product_feedFilters the temporary, unsaved feed configuration as a user steps through the Edit Feed wizard before the feed is finalized.
adt_edit_feed_general_tab_propsFilters the feed property values about to be saved when the General tab is submitted, right before the feed saves.
adt_edit_feed_filters_rules_tab_propsFilters the feed property values about to be saved when the legacy combined Filters & Rules tab is submitted.
adt_edit_feed_filters_tab_propsFilters the feed property values about to be saved when the Filters tab is submitted.
adt_edit_feed_rules_tab_propsFilters the feed property values about to be saved when the Rules tab is submitted.
adt_edit_feed_field_mapping_tab_propsFilters the feed property values about to be saved when the Field Mapping tab is submitted.
adt_edit_feed_category_mapping_tab_propsFilters the feed property values about to be saved when the Category Mapping tab is submitted.
adt_edit_feed_conversion_analytics_tab_propsFilters the feed property values about to be saved when the Conversion & Analytics tab is submitted.
adt_pfp_autoloaded_ajax_settingsFilters which settings, when saved through the plugin’s AJAX settings endpoint, are stored with autoload enabled.
adt_pfp_allowed_ajax_settingsFilters the allowlist of option names that AJAX endpoint is permitted to update, so companion plugins can extend it with their own adt_-prefixed options.
adt_pfp_regenerate_action_schedulers_countFilters the running count of feeds regenerated during the admin’s “regenerate schedulers” routine, letting add-ons add their own scheduled actions to the total.
adt_pfp_cron_notices_dataFilters the list of cron-driven notice definitions, letting Elite and other add-ons register their own admin notices.
adt_pfp_show_noticeFilters whether a specific admin notice should display, based on its key, context, and data.
adt_pfp_get_all_admin_noticesFilters the final list of admin notices returned to the admin UI.
adt_pfp_show_get_elite_noticeFilters whether the “Get Elite” upsell notice displays.
adt_pfp_show_notice_bar_liteFilters whether the free-version notice bar displays on plugin admin pages.
pfp_notice_bar_lite_upgrade_linkFilters the “Upgrade to Elite” URL shown in that notice bar. Unlike most hooks in this plugin, this one doesn’t use the adt_ prefix.
adt_pfp_show_logo_upgrade_buttonFilters whether the logo upgrade-to-Elite button displays in the admin UI.
adt_is_plugin_pageFilters whether the current admin screen counts as a Product Feed Pro or Elite page, used to gate plugin-specific asset loading.
postmeta_form_limitFilters the row limit on the plugin’s own query that excludes internal adt_ meta keys from the classic editor’s “Add Custom Field” dropdown. The plugin intentionally reuses this exact filter name from WordPress core so existing callbacks that already target postmeta_form_limit work the same way here.
adt_kses_allowed_tagsFilters the list of allowed HTML tags passed to the plugin’s admin JavaScript, used for client-side sanitization.
adt_kses_allowed_attrsFilters the list of allowed HTML attributes passed alongside adt_kses_allowed_tags to the plugin’s admin JavaScript.
adt_show_pfp_{menu_slug}_pageA dynamic filter, one per admin page, named after that page’s menu slug. Returning false hides that specific admin page.
adt_allowed_install_pluginsFilters the list of sister plugins allowed to be installed through the plugin’s one-click installer.
adt_pfp_setup_checklist_sister_pluginsFilters the list of sister plugins suggested in the onboarding setup checklist.
adt_pfp_setup_checklist_eligibleFilters whether the current site is eligible to see the setup checklist at all (only fresh installs are eligible by default).
adt_pfp_show_setup_checklistFilters whether the setup checklist displays at all.
adt_pfp_setup_checklist_stepsFilters the array of onboarding checklist steps shown on the Manage Feeds page.

Sanitization and HTML output

HookDetail
adt_product_feed_allowed_html_tagsFilters which HTML tags survive sanitization for feed channels that support limited HTML formatting, like Google Merchant Center.
adt_product_feed_pure_plain_text_contentFilters the fully plain-text-converted content used for channels that require plain text with no HTML, like Pinterest.
adt_product_feed_legacy_project_hash_keyspaceFilters the character set used to generate a feed’s legacy-style project hash.

Abilities API and tracking

Product Feed Pro registers a set of actions with the WordPress Abilities API, an emerging standard for exposing plugin functionality to AI agents and automation tools.

HookDetail
adt_pfp_enable_abilitiesFilters whether the plugin registers with the Abilities API at all.
adt_pfp_ability_tracking_statusFilters the tracking and integration status array returned by the “get tracking status” ability, letting Elite override entries this base plugin doesn’t own, like real Facebook Conversions API state.

Assets and post type

HookDetail
adt_product_feed_cpt_argsFilters the registration arguments for the plugin’s internal adt_feed custom post type.
adt_product_feed_dataFilters the default data array built for every new feed object, letting other code register additional default properties.
adt_product_feed_max_history_productsFilters how many historical product-count snapshots are kept per feed.
adt_pfp_enable_subresource_integrity_checkFilters whether the plugin adds subresource integrity attributes to its own built script and style tags in production.
adt_facebook_pixel_post_idFilters the post ID used to resolve the current product for Facebook Pixel event tracking, useful when the global post context doesn’t match the actual product being viewed.
adt_pfp_enqueue_add_cart_scriptFilters whether the plugin’s add-to-cart click tracking script loads on the current page.

Common customization examples

These examples use real hook signatures verified against the current plugin code. Add them to a custom plugin or your theme’s functions.php.

Add your own feed property to Export/Import

adt_pfp_export_feed_data_properties receives the list of Product_Feed property keys the Export/Import tool reads, plus the feed being exported:

add_filter( 'adt_pfp_export_feed_data_properties', 'my_custom_export_property', 10, 2 );
function my_custom_export_property( $data_properties, $feed ) {
    $data_properties[] = 'my_custom_property';
    return $data_properties;
}

Any property your code adds that the feed object doesn’t actually have is skipped safely, so this is safe to add even for properties that only exist when your own add-on is active.

Add a settings row to the General tab

adt_general_feed_settings_after_shipping_countries fires right after the “Include all shipping countries” row on the General tab, and receives the feed being edited:

add_action( 'adt_general_feed_settings_after_shipping_countries', 'my_custom_general_tab_row' );
function my_custom_general_tab_row( $feed ) {
    echo '<tr><td>My setting</td><td>...</td></tr>';
}

Save the new field’s value from the adt_edit_feed_general_tab_props filter, which runs when the General tab form is submitted, so your setting is actually written to the feed.

Register and evaluate a custom filter condition

Adding a working custom condition to the Filters and Rules builder needs two hooks together: one to add it to the dropdown, and one to evaluate it when a feed runs.

add_filter( 'adt_pfp_get_filters_rules_conditions', 'my_custom_condition' );
function my_custom_condition( $conditions ) {
    $conditions[] = array(
        'value' => 'starts_with',
        'label' => __( 'Starts with', 'my-textdomain' ),
    );
    return $conditions;
}

add_filter( 'adt_pfp_evaluate_filters_rules_condition', 'my_evaluate_starts_with', 10, 5 );
function my_evaluate_starts_with( $result, $condition, $product_value, $filter_value, $case_sensitive ) {
    if ( 'starts_with' !== $condition ) {
        return $result;
    }
    return 0 === ( $case_sensitive ? strpos( $product_value, $filter_value ) : stripos( $product_value, $filter_value ) );
}

Registering the condition without also handling it in adt_pfp_evaluate_filters_rules_condition leaves it doing nothing when a feed runs, since nothing tells the plugin how to check it.

Turn off adaptive batch sizing for one feed

adt_product_feed_adaptive_batch_enabled receives the current default and the feed’s ID:

add_filter( 'adt_product_feed_adaptive_batch_enabled', 'my_disable_adaptive_batching', 10, 2 );
function my_disable_adaptive_batching( $enabled, $feed_id ) {
    if ( 123 === $feed_id ) {
        return false;
    }
    return $enabled;
}

Replace 123 with your feed’s ID (visible in the feed’s edit URL) so this only affects that one feed and every other feed keeps using adaptive sizing.

FAQ

Do I need to read the plugin’s source code to use these hooks?
No. You only need the hook name, when it fires, and what arguments it passes, all listed above.
Will these hook names change in a future update?
Hook names are part of the plugin’s public API, and AdTribes avoids renaming them without notice. Still, test any custom code on a staging site after updating the plugin.
Where do I add this code?
Add it to a custom (site-specific) plugin, or to your active theme’s functions.php if you’re not using a child theme. Don’t edit Product Feed Pro’s own files directly, since any changes there are lost on the next plugin update.

Need more help?

If you’re on Product Feed Elite or another premium AdTribes plugin and need help with a specific customization, open a support ticket and the team can point you to the right hook for your use case.

If you’re using the free Product Feed Pro plugin, ask your question on the WordPress.org support forum.

Was this article helpful?

Related Articles

Complete Your Purchase
AdTribes WooCommerce Product Feed

The best WooCommerce product feed plugin

  • AdTribes Pty Ltd
    ABN: 40 675 636 816
Product
Resources & Info
Partner Sites
Rymera