Meta Box
Support Forum
Support › MB Frontend Submission › control posts comments on or off › Reply To: control posts comments on or off
Hi,
Please use this snippet:
add_filter( 'rwmb_frontend_insert_post_data', function( $data, $config ) { if ( 'meta-box-id' == $config['id'] ) { $data['comment_status'] = 'closed'; } return $data; }, 10, 2 );