Closed FaycalBoutam closed 1 year ago
Instead of removing the second condition, I would suggest to transform the if
clause as follows:
if ( isset( $postdata[ $meta_key ] ) && '' !== $postdata[ $meta_key ] ) {
update_post_meta( $post_id, $meta_key, $postdata[ $meta_key ] );
} else {
delete_post_meta( $post_id, $meta_key );
}
This way we don't litter the database with unnecessary metadata.
Thanks @FaycalBoutam and @LuigiPulcini. I have fixed this in the new release of the plugin.
It happens in this line, removing that second check fixes the issue.
Ticket: https://secure.helpscout.net/conversation/2347577064/92004?folderId=7603842