hi there I have a function which makes some row in a table, If i call it it works normally, but if I use as register_activation_hook(__FILE__,'add_sellers_brand_size_to_db'); it doesn't work, code is here https://paste.ubuntu.com/p/w8vRZmp8H3/

New contributor
Saeb Molaee is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Try debugging, eg via error_log(). My first guess: your function is called but fails. I see various global which is either wrong or bad practice in PHP, not sure if wp_get_current_user() is available here, etc. – kero Dec 6 at 14:43
  • @kero yeah I`m an always noob :D – Saeb Molaee Dec 6 at 14:45
  • Everybody is a "noob" once. Try debugging this as far as you can and update your question with the info you get from that – kero Dec 6 at 14:47
  • @kero ok I removed globals moved variables in a file and add require 'formsconfig.php'; $a=$tire_gravity_form_id; to my function but i get PHP Notice: Undefined variable: tire_gravity_form_id – Saeb Molaee Dec 6 at 16:04

Your Answer

Saeb Molaee is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.