title: WP ALL IMPORT i want to do a basic php function with the php editor
body: <p>I need help with the php function editor in wp all import. It's a very long time i haven't used PHP so i hope you can help me a little !</p>
  
  <p>I guess I need to use the php function editor for my problem.</p>
  
  <p>With WP ALL IMPORT, i get this example in my xml file :
  Jérôme xxx
  On my website, the data about all agents is managed by an agent module (instead of just showing the name of the agent, it shows a photo, a name, a phone, etc... for each person)
  By auto-detecting, WP ALL IMPORT gives me :
  (name) agent (value-serialized) key 0 value 24756
  This value is set specifically for the agent Jérome xxx</p>
  
  <p>I have about 6 or 7 agents in my database with each a different value. From what i saw, i don't think i can just set this thing with the "serialized" field option in wpallimport.</p>
  
  <p>So i guess i need to use the php function editor. I was quickly looking for in the "similar questions" and i took this example from the lef :</p>
  
  <pre><code>&lt;?php
  function ae_stock_change($x) {     * function agent($x) { 
  if (StockLevel == "Green")         * if (agent == "Jérome xxx")  
      $x = 12;                       *     $x = 24756
  elseif (StockLevel == "Amber")     * elseif (agent == "Jonathan xxx")
      $x = 3;                        *     $x = 88888
  else $x = 0;                       * etc...
  return $x;
  ?&gt;
  </code></pre>
  
  <p>UPDATING :
  It's a real estate multicast application ! (sorry for my english if it's not correct). Each time we fill an real estate ad on netty app, the xml file is updated. </p>
  
  <p>Then on WP, we have several modules and which one is "propriétés" (real estate property) and another one is "agent" where every fields is identified with Advanced Custom Fields. I identified for each agent the value of the post created by wordpress (by example, agent "Jerome" is 24756, etc..). </p>
  
  <p>So on WPallimport, when i import the xml file, by example, i can have 15 differents goods and each good can have a different agent. In the xml file, i have this tag  Jérôme xxx or another name inside. In the field "agent" of WPALLIMPORT, if i use autodetecting, it modifies field options by "serialized", it sets key to 0 and fix the value of the first agent created "24756" because the tag in xml file is different from ACF field(=agent) i guess.</p>
  
  <p>So the need of my function is to tell WPALLIMPORT that:
   IF the tag "nom à afficher" from xml file is "Jonathan", then the value must be "25555"
  ELSEIF the tag gives me "Jerome", then the value must be "24756"
  ELSEIF etc...</p>
  
  <p>Finally on each real estate ad on the website, it increments for each ad a "window" with agent information coming from the "agent" module.</p>
  
  <p>I hope it's not so hard to understand !</p>
  
  <p>Thank you</p>
  
  <p>Hedredo</p>