Product XML Feeds Manager for WooCommerce exposes a small, focused set of filters and actions so you can change gating, override per-feed values, extend the [alg_product_function] allow-list, and hook the feed-generation lifecycle in code, without editing plugin files.
All option ids referenced below live under WPFactory > Product XML Feeds (also reachable at WooCommerce > Settings > Product XML Feeds). Per-feed options carry the feed number as a suffix, for example alg_products_xml_header_1.
Filters #
| Filter | Passed | Purpose |
|---|---|---|
alg_wc_product_xml_feeds_settings |
$value, $type |
The Pro gating filter. In Pro it returns an empty value (unlocking a field); in Free it returns the passed disabled/readonly array. Used on the feed count cap and every Pro option. |
alg_wc_product_xml_feeds_values |
$value, $type, $file_num |
Resolves per-feed values by $type (for example total_number, update_interval, stock_status, min_price, max_price, catalog_visibility, product_type_include, custom_meta_incl). Filter it to override a value in code. |
alg_wc_product_xml_feeds_shortcode_allowed_functions |
$functions (array) |
The allow-list of WC_Product methods that [alg_product_function function="..."] may call. Add a method name to expose it. |
alg_allowed_custom_functions |
$functions (array) |
The allow-list for the global custom_function shortcode attribute. Only listed, existing functions are called on the shortcode result. |
alg_shortcodes_list |
$shortcodes (array) |
The registered shortcode names. Useful for tooling that lists available tags. |
Actions #
| Hook | Fires |
|---|---|
alg_wc_product_xml_feeds_create_products_xml_hook_{n} |
The scheduled (WP-Cron) event for feed {n}. It runs create_products_xml( $file_num ) on the selected interval. You can trigger or reschedule it programmatically. |
Generating a feed programmatically #
Two entry points regenerate a feed on demand:
- Admin URL:
?alg_create_products_xml={n}with a valid_wpnonce(nonce actionalg_create_products_xml_nonce). Requires themanage_woocommercecapability. This is what the Create now button uses. - External AJAX action:
admin-ajax.php?action=alg_wc_product_xml_feeds_generate_xml_external&alg_create_products_xml={n}&secret=.... Thesecretmust equalwp_hash()of your Security Key (alg_products_xml_feeds_security_key). This is the URL embedded in the Manual Cron Job Command.
// Expose an extra WC_Product method to [alg_product_function].
add_filter( 'alg_wc_product_xml_feeds_shortcode_allowed_functions', function ( $functions ) {
$functions[] = 'get_weight';
return $functions;
} );
Product XML Feeds Manager for WooCommerce
Get more from Product XML Feeds Manager for WooCommerce
See every feature and the pricing on the Product XML Feeds Manager for WooCommerce plugin page.
// Register a custom_function target for shortcodes: [... custom_function="my_uppercase"].
add_filter( 'alg_allowed_custom_functions', function ( $functions ) {
$functions[] = 'my_uppercase';
return $functions;
} );
function my_uppercase( $value ) {
return strtoupper( $value );
}
Notes #
- The value filter name is
alg_wc_product_xml_feeds_values(with thealg_prefix). If you are extending Pro-only values, hook that exact name. - The
custom_functionand[alg_product_function]allow-lists exist for security: arbitrary function names are ignored unless allow-listed. Keep your additions to safe, read-only functions.
Need a hand? #
For implementation questions, our team answers every ticket on the Product XML Feeds support forum.