Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy

To resolve the issue with Gravity Forms and the Advanced Post Creation Add-On not updating ACF fields on a custom taxonomy, you can try adding the following code snippet to your WordPress theme’s functions.php file: add_action( ‘gform_post_create_post’, ‘update_custom_taxonomy_acf_fields’, 10, 3 ); function update_custom_taxonomy_acf_fields( $post_id, $form, $entry ) { // Check if the custom taxonomy term … Read more

How to overwrite image if it already exists – WordPress, Gravity form

These lines of code and can help you to overwrite image $attachment_id = get_post_thumbnail_id($post_id); wp_delete_attachment($attachment_id, true); if(isset($file) && !empty($file) ){ $upload_overrides = array(‘test_form’=> false); $movefile = wp_handle_upload($file, $upload_overrides); $filename = basename( $movefile[‘url’] ); $wp_filetype = wp_check_filetype($filename, null ); $attachment = array( ‘guid’ => $wp_upload_dir[‘url’] . “https://wordpress.stackexchange.com/” . $filename, ‘post_mime_type’ => $wp_filetype[‘type’], ‘post_title’ => preg_replace(‘/\.[^.]+$/’, ”, … Read more