Did Meta Box change how it handles the post_id configuration for frontend submissions?? I relied on the post_id attribute in the $config array during frontend submissions to manage post-related actions. However, I noticed that post_id is now being returned as 0, while the correct ID is available under object_id. This meant my custom logic was failing until I explicitly added a fallback to use object_id when post_id equals 0. Was this changed and if so when??
I use in these sorts of scenarios and I imagine others do too:
add_filter( 'rwmb_frontend_redirect', function( $redirect, $config ) {
if ( 'my_form_ID' !== $config['id'] ) {
return $redirect;
}
$post_id = isset($config['post_id']) ? (int) $config['post_id'] : null;