Uploading images via ACF update_field function

Should anyone come across the same issue, I found that when creating the $gallery_data array I was creating an array of arrays instead of key value pairs, I ended up just running the update_field function inside a foreach with the add_image key value pair created. $gallery_img_id = rudr_upload_file_by_url($gallery_img[“original_path”]); $acf_gallery_slug = “gallery_image_” . $counter; $add_image = … Read more

CPU Overloading due to some hooks

This code is causing your replace_authors_name_attributes() function to run every time a page is visited on your site, so yes, your hooks are running: schedule_authors_consistency() { if (!wp_next_scheduled(‘consistent_author’)) { wp_schedule_single_event(time(), ‘consistent_author’); } } add_action(‘init’, ‘schedule_authors_consistency’); Since you do this three times and your code queries every product each time this is going to absolutely hammer … Read more

File not found.