Forums › WooCommerce Product XML Feeds Manager – Support Forum › few questions before pro
- Support forum for the WooCommerce Product XML Feeds Manager.
Tagged: Custom Meta Filter
- This topic has 6 replies, 3 voices, and was last updated 2 days, 6 hours ago by
birendra.
-
AuthorPosts
-
March 2, 2026 at 11:13 pm #180903
Ned
ParticipantHi there,
1. can it filter based on the new woocommerce brands feature?
2. Can it replace some values. For example woocommerce stok status is “in_stock” but i need to put “in stock” for some reasonsMarch 6, 2026 at 8:53 pm #181087Hi Ned,
Thanks for your questions.
Both points are supported.
1. Filtering by WooCommerce Brands
Since the new WooCommerce Brands feature is registered as a taxonomy, the plugin can filter products by brand directly in the feed conditions. You can use the “Custom taxonomy to include” option and set the taxonomy to:product_brandThen specify the brands you want included (e.g.
lenovo,samsung,apple).
This will limit the feed to products that belong to those brands.If you also need to output the brand in the feed, you can use the shortcode:
[alg_product_terms taxonomy="product_brand"]2. Adjusting the stock status value
You can control the stock availability output using the built-in shortcode:[alg_product_stock_availability remove_number="yes"]This outputs “In stock” instead of
in_stock.If you need the exact format “in stock”, you can use the built-in find-and-replace option:
[alg_product_stock_availability find="In stock" replace="in stock"]No custom code or hooks are required for either case.
Let us know if you need help configuring the feed.
Best regards
March 8, 2026 at 12:54 am #181175Ned
Participantthanks for reply.
Is it able to handle 10K products, choose only in stock and finish and xml file with 3000 products.
Is there kind of batch system to handle this kind of requestsMarch 9, 2026 at 3:03 pm #181250Hi Ned,
Yes, the plugin can handle large feeds, even with 10,000 products. You can filter by stock status, product status, category, and more.
It supports batching using Offset products and Total products, so feeds can be generated in smaller parts—for example, 0–3,000 products in the first file, 3,001–6,000 in the next, etc.
Batches can be run manually via the AJAX option or automated with a cron job, ensuring even very large feeds are created efficiently without timeouts.
Best regards
March 23, 2026 at 1:27 pm #182655Ned
ParticipantLastly, it is possible to filter for custom metafield for products?
I have custom field like this
<p class=”p1″><span class=”s1″>function</span><span class=”s2″> generatepress_child_admin_xml_status_field() {</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span></span><span class=”s1″>global</span><span class=”s2″> $post;</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span></span><span class=”s1″>if</span><span class=”s2″> ( ! $post || ! isset( $post->ID ) ) {</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span></span><span class=”s1″>return</span><span class=”s2″>;</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>}</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>$value <span class=”Apple-converted-space”> </span>= get_post_meta( $post->ID, </span><span class=”s3″>’xml_status'</span><span class=”s2″>, </span><span class=”s1″>true</span><span class=”s2″> );</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>$checked = ( $value === </span><span class=”s3″>’exclude'</span><span class=”s2″> ) ? </span><span class=”s3″>’yes'</span><span class=”s2″> : </span><span class=”s3″>’no'</span><span class=”s2″>;</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>woocommerce_wp_checkbox(</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>array(</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span></span><span class=”s3″>’id'</span><span class=”s2″><span class=”Apple-converted-space”> </span>=> </span><span class=”s3″>’xml_status'</span><span class=”s2″>,</span></p>
<p class=”p3″><span class=”s5″><span class=”Apple-converted-space”> </span></span><span class=”s2″>’label'</span><span class=”s5″> <span class=”Apple-converted-space”> </span>=> __( </span><span class=”s2″>’XML status'</span><span class=”s5″>, </span><span class=”s2″>’generatepress_child'</span><span class=”s5″> ),</span></p>
<p class=”p3″><span class=”s5″><span class=”Apple-converted-space”> </span></span><span class=”s2″>’description'</span><span class=”s5″> => __( </span><span class=”s2″>’this products will be (exclude)'</span><span class=”s5″>, </span><span class=”s2″>’generatepress_child'</span><span class=”s5″> ),</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span></span><span class=”s3″>’value'</span><span class=”s2″> <span class=”Apple-converted-space”> </span>=> $checked,</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>)</span></p>
<p class=”p1″><span class=”s2″><span class=”Apple-converted-space”> </span>);</span></p>
<p class=”p4″><span class=”s4″>}</span></p>March 23, 2026 at 1:35 pm #182656Ned
Participantfunction generatepress_child_admin_xml_status_field() {
global $post;
if ( ! $post || ! isset( $post->ID ) ) {
return;
}
$value = get_post_meta( $post->ID, ‘xml_status’, true );
$checked = ( $value === ‘exclude’ ) ? ‘yes’ : ‘no’;woocommerce_wp_checkbox(
array(
‘id’ => ‘xml_status’,
‘label’ => __( ‘XML status’, ‘generatepress_child’ ),
‘description’ => __( ‘İşaretlenmiş ürünler XML\’den çıkarılır (exclude)’, ‘generatepress_child’ ),
‘value’ => $checked,
)
);
}March 24, 2026 at 2:16 pm #182711birendra
ModeratorHi Ned,
Yes, the XML feed can filter products by a custom meta field, but the meta key must be saved for the product.
From your snippet, it looks like a function definition. To filter, you need the actual meta key (e.g., xml_status ) and its value saved. Once saved, you can use the Custom Meta Filter in the XML feed settings:
- Meta Key: xml_status
- Condition: =
- Value: yes
I’ve attached the screenshot for reference:
https://prnt.sc/jvAYqms1YPiMPlease give it a try and let us know how it works.
Best regards
-
AuthorPosts
- You must be logged in to reply to this topic.