Updates to functions.php file via CPanel not showing in WordPress

Question

I have made changes to my functions.php file through Theme Editor in WordPress and it works as expected but deletes that piece of code a few days later.
So I tried changing the actual functions.php file through CPanel to make it permanent, WordPress wont recognise these changes? Is my code wrong or does it take some time for this to pull through?

Code below;

add_filter( 'mc4wp_integration_contact-form-7_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber, $cf7_form_id) {
   if ($cf7_form_id == 2202) {
       $subscriber->tags[] = 'Hire';
   } else if ($cf7_form_id == 2304) {
       $subscriber->tags[] = 'Equipment';
   } else if ($cf7_form_id == 3729) {
       $subscriber->tags[] = 'Parts';
   } else if ($cf7_form_id == 2305) {
       $subscriber->tags[] = 'General';
   } else if ($cf7_form_id == 4444) {
       $subscriber->tags[] = 'Info Pack';
   } 
   return $subscriber;
}, 10, 2);

0
Tayla 2 months 2021-07-26T20:34:12-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse