Title: Rule does not get executed
Last modified: April 5, 2019

---

# Rule does not get executed

 *  Resolved [romfeo](https://wordpress.org/support/users/romfeo/)
 * (@romfeo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/rule-does-not-get-executed/)
 * Hello,
 * I am facing an issue with a rule. I have the following scenario.
 * **Backstory**
    I have migrated a site from Magento to Woocommerce. For this site
   I was sending the product feed to Skroutz.gr. Skroutz requires that the product
   ID remains the same for the lifetime of the product. So, because woocommerce 
   have assigned new ids to each product, I have imported the old product id from
   Magento to the Height field of Woocommerce.\
 * **Configuration of feed**
    So, in my field mapping I am setting Height as the
   value of the Id field. For new products that are created for the first time in
   Woocommerce and did not exist in Magento, the Height field is empty. So, for 
   the new products I have set a rule as follow:
 * TYPE IF CONDITION THEN
 * Rule Height Is Empty Product Id
 * **The Problem**
    My problem is that for products that height is empty no ID field
   in present in the xml file at all.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [romfeo](https://wordpress.org/support/users/romfeo/)
 * (@romfeo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11395619)
 * **Here is my debug log:**
 * April 5, 2019, 11:58 am
    Array ( [PHP] => 7 [Wordpress] => 5.1.1 [WooCommerce]
   => 3.5.7 [WooCommerce Product Feed PRO] => 5.2.6 ) Array ( [Single products] 
   => 602 [Variation products] => 51 [Total products] => 653 ) Array ( [0] => Array([
   channel_hash] => d4e5a1ae056299a65ce0d2b72b83ac00 [name] => Skroutz [fields] 
   => skroutz [taxonomy] => none [utm_source] => Skroutz [type] => Comparison shopping
   engine [projectname] => Feed [countries] => Greece [fileformat] => xml [cron]
   => hourly [step] => 100 [project_hash] => be2abbf3956d7d830952de91be40ff38 [filename]
   => be2abbf3956d7d830952de91be40ff38 [external_file] => [https://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/xml/be2abbf3956d7d830952de91be40ff38.xml](https://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/xml/be2abbf3956d7d830952de91be40ff38.xml)[
   query_log] => [http://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/logs/query.log](http://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/logs/query.log)[
   query_output_log] => [http://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/logs/query_output.log](http://homecareshop.gr/wp-content/uploads/woo-product-feed-pro/logs/query_output.log)[
   attributes] => Array ( [0] => Array ( [rowCount] => 0 [attribute] => id [prefix]
   => [mapfrom] => height [suffix] => )
 *  [1] => Array
    ( [rowCount] => 1 [attribute] => name [prefix] => [mapfrom] =>
   title [suffix] => )
 *  [2] => Array
    ( [rowCount] => 2 [attribute] => link [prefix] => [mapfrom] =>
   link [suffix] => )
 *  [3] => Array
    ( [rowCount] => 3 [attribute] => image [prefix] => [mapfrom] =
   > image [suffix] => )
 *  [4] => Array
    ( [rowCount] => 4 [attribute] => category [prefix] => [mapfrom]
   => raw_categories [suffix] => )
 *  [5] => Array
    ( [rowCount] => 5 [attribute] => price_with_vat [prefix] => [mapfrom]
   => price [suffix] => )
 *  [6] => Array
    ( [rowCount] => 6 [attribute] => manufacturer [prefix] => [mapfrom]
   => pa_manufacturer [suffix] => )
 *  [7] => Array
    ( [rowCount] => 7 [attribute] => mpn [prefix] => [mapfrom] => 
   sku [suffix] => )
 *  [8] => Array
    ( [rowCount] => 8 [attribute] => availability [prefix] => [mapfrom]
   => pa_diathesimotita [suffix] => )
 *  [9] => Array
    ( [rowCount] => 9 [attribute] => instock [prefix] => [mapfrom]
   => quantity [suffix] => )
 *  [11] => Array
    ( [rowCount] => 11 [attribute] => color [prefix] => [mapfrom]
   => pa_chrma [suffix] => )
 *  [12] => Array
    ( [rowCount] => 12 [attribute] => weight [prefix] => [mapfrom]
   => length [suffix] => )
 *  )
 *  [addrow] => 1
    [page] => filters_rules [utm_medium] => cpc [utm_campaign] =>
   Skroutz [utm_term] => id [utm_content] => [active] => true [last_updated] => 
   05 Apr 2019 11:50 [running] => ready [nr_products] => 653 [nr_products_processed]
   => 0 [history_products] => Array ( [15 Dec 2018 14:55] => 716 [15 Dec 2018 15:
   48] => 716 [15 Dec 2018 15:51] => 716 [15 Dec 2018 15:56] => 717 [15 Dec 2018
   19:55] => 716 [17 Dec 2018 07:40] => 716 [17 Dec 2018 19:34] => 716 [18 Dec 2018
   07:29] => 716 [19 Dec 2018 14:33] => 716 [19 Dec 2018 14:49] => 716 [19 Dec 2018
   14:53] => 716 [19 Dec 2018 15:03] => 716 [19 Dec 2018 19:28] => 716 [20 Dec 2018
   07:51] => 711 [20 Dec 2018 19:29] => 711 [21 Dec 2018 07:49] => 711 [21 Dec 2018
   19:38] => 711 [22 Dec 2018 07:49] => 711 [22 Dec 2018 19:53] => 711 [23 Dec 2018
   07:33] => 711 [23 Dec 2018 19:32] => 711 [24 Dec 2018 07:27] => 1026 [24 Dec 
   2018 20:19] => 711 [25 Dec 2018 07:39] => 711 [28 Dec 2018 19:43] => 711 [29 
   Dec 2018 07:28] => 711 [29 Dec 2018 19:48] => 711 [30 Dec 2018 07:44] => 711 [
   30 Dec 2018 19:49] => 711 [31 Dec 2018 08:07] => 711 [31 Dec 2018 19:50] => 711[
   01 Jan 2019 08:00] => 711 [01 Jan 2019 20:02] => 711 [02 Jan 2019 07:47] => 711[
   02 Jan 2019 19:46] => 711 [03 Jan 2019 07:45] => 711 [03 Jan 2019 19:56] => 711[
   04 Jan 2019 07:57] => 711 [04 Jan 2019 19:58] => 711 [05 Jan 2019 07:45] => 711[
   05 Jan 2019 20:01] => 711 [06 Jan 2019 08:02] => 711 [06 Jan 2019 21:37] => 711[
   07 Jan 2019 08:05] => 711 [07 Jan 2019 20:02] => 711 [08 Jan 2019 22:44] => 1026[
   09 Jan 2019 14:10] => 711 [10 Jan 2019 19:28] => 711 [11 Jan 2019 08:00] => 711[
   12 Jan 2019 13:22] => 710 [12 Jan 2019 20:46] => 710 [13 Jan 2019 08:20] => 710[
   13 Jan 2019 19:33] => 711 [14 Jan 2019 07:33] => 711 [14 Jan 2019 19:36] => 711[
   15 Jan 2019 07:36] => 711 [15 Jan 2019 19:33] => 711 [16 Jan 2019 07:33] => 711[
   16 Jan 2019 19:28] => 711 [17 Jan 2019 07:29] => 710 [17 Jan 2019 12:38] => 443[
   17 Jan 2019 12:41] => 443 [17 Jan 2019 12:56] => 710 [17 Jan 2019 13:12] => 1028[
   18 Jan 2019 07:28] => 710 [19 Jan 2019 07:29] => 710 [23 Jan 2019 13:33] => 541[
   25 Jan 2019 15:19] => 541 [25 Jan 2019 15:23] => 541 [25 Jan 2019 16:12] => 534[
   02 Feb 2019 18:15] => 635 [27 Feb 2019 12:26] => 635 [01 Mar 2019 10:42] => 635[
   12 Mar 2019 11:48] => 635 [16 Mar 2019 17:38] => 635 [21 Mar 2019 07:33] => 636[
   21 Mar 2019 11:21] => 636 [22 Mar 2019 10:23] => 642 [27 Mar 2019 20:15] => 642[
   03 Apr 2019 11:49] => 642 [03 Apr 2019 12:25] => 642 [03 Apr 2019 13:25] => 642[
   03 Apr 2019 14:26] => 642 [03 Apr 2019 15:26] => 642 [03 Apr 2019 16:26] => 642[
   03 Apr 2019 17:25] => 642 [03 Apr 2019 18:27] => 642 [03 Apr 2019 19:26] => 642[
   03 Apr 2019 20:26] => 642 [03 Apr 2019 21:26] => 642 [03 Apr 2019 22:26] => 642[
   03 Apr 2019 23:26] => 642 [04 Apr 2019 00:26] => 642 [04 Apr 2019 01:26] => 642[
   04 Apr 2019 02:26] => 642 [04 Apr 2019 03:25] => 642 [04 Apr 2019 04:25] => 642[
   04 Apr 2019 05:25] => 642 [04 Apr 2019 06:25] => 642 [04 Apr 2019 07:25] => 642[
   04 Apr 2019 08:26] => 642 [04 Apr 2019 09:26] => 642 [04 Apr 2019 10:26] => 642[
   04 Apr 2019 11:26] => 642 [04 Apr 2019 12:26] => 642 [04 Apr 2019 13:26] => 642[
   04 Apr 2019 14:25] => 642 [04 Apr 2019 15:26] => 642 [04 Apr 2019 16:25] => 642[
   04 Apr 2019 17:26] => 642 [04 Apr 2019 18:25] => 642 [04 Apr 2019 19:25] => 642[
   04 Apr 2019 20:25] => 642 [04 Apr 2019 21:26] => 642 [04 Apr 2019 22:25] => 642[
   04 Apr 2019 23:26] => 642 [05 Apr 2019 00:25] => 642 [05 Apr 2019 01:26] => 642[
   05 Apr 2019 02:26] => 642 [05 Apr 2019 03:26] => 642 [05 Apr 2019 04:25] => 642[
   05 Apr 2019 05:25] => 642 [05 Apr 2019 06:25] => 642 [05 Apr 2019 07:26] => 642[
   05 Apr 2019 08:25] => 642 [05 Apr 2019 09:26] => 642 [05 Apr 2019 10:26] => 642[
   05 Apr 2019 10:47] => 642 [05 Apr 2019 10:51] => 1284 [05 Apr 2019 10:59] => 
   1284 [05 Apr 2019 11:02] => 642 [05 Apr 2019 11:05] => 642 [05 Apr 2019 11:25]
   => 642 [05 Apr 2019 11:39] => 642 [05 Apr 2019 11:52] => 642 )
 *  [rules2] => Array
    ( [1544888395113] => Array ( [rowCount] => 1544888395113 [
   attribute] => height [condition] => empty [criteria] => [than_attribute] => id[
   newvalue] => )
 *  [1545230526118] => Array
    ( [rowCount] => 1545230526118 [attribute] => quantity[
   condition] => =< [criteria] => 0 [than_attribute] => quantity [newvalue] => Y)
 *  )
 *  [project_update] => yes
    [woosea_page] => filters_rules [product_variations]
   => on )
 * )
    Array ( )
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11400387)
 * Hi romfeo,
 * Thanks for using our plugin and reaching out to us.
 * The rule you have created will fill the height attribute with the product id 
   when the height value is empty. It is basically saying to the plugin: when the
   height field in the product feed is empty than fill it with the product ID. Rules
   are not replacing empty fields beforehand (which you need).
 * It is a bit hard to explain but I hope it makes sense?
 * Best
    Eva
 *  Thread Starter [romfeo](https://wordpress.org/support/users/romfeo/)
 * (@romfeo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11400516)
 * Hello Eva and thank you for your reply!
 * It makes kinda sense.
 * For the products that height is empty, isn’t the id field empty in the feed (
   remember i am assigning height to ID)? Shouldn’t the empty value be filled with
   product ID?
 * In my case there is no ID field at all in the feed…
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11400769)
 * No, what you are essentially are doing is filling the height field in **the XML
   feed **itself with the product ID when the height field is empty.
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11435467)
 * Assuming the issue at hand has been resolved and our support is no longer needed
   I am going to close this topic for housekeeping reasons.
 * Please feel free to reach out again whenever you need our help.
 * All the best,
    Eva

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Rule does not get executed’ is closed to new replies.

 * ![](https://ps.w.org/woo-product-feed-pro/assets/icon-256x256.png?rev=3111496)
 * [Product Feed PRO for WooCommerce by AdTribes – Product Feeds for WooCommerce](https://wordpress.org/plugins/woo-product-feed-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-product-feed-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-product-feed-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-product-feed-pro/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/rule-does-not-get-executed/#post-11435467)
 * Status: resolved