Hi Mariana,
You're welcome!
One quick caveat before we start, please check out Support FAQ on the limit of our support for code, as we don't cover custom code since that's a developer's job:
www.ostraining.com/support-faq/.
That being said, you should create a copy of your site to test the conditional action on a test site. Use our "Move Your Drupal Site to a New Location" to make a copy of your site:
www.ostraining.com/blog/drupal/move-your...e-to-a-new-location/ Having a test site will allow you to experiment with changes without worrying about breaking your live site. Then you can test the code as it is to see what the result is and modify as needed.
By the way, we recently added (free-of-charge) a PHP class to everyone's subscription:
www.ostraining.com/courses/class/coding/...nners/view?task=view The class would definitely be a big help in getting your custom code working.
Hope this helps! :)
Kind regards,
Nick