Hi again,
no need for this quick fix. Just save the form (press update, not save and send from the wot meta box).
It won’t work out of the box, because the code for saving the meta box content is wrong. Change from line 370
if ( isset( $_POST[ 'mimo_shipment_tracking_nonce' ] ) && wp_verify_nonce( $_POST[ 'mimo_shipment_tracking_nonce' ], 'mimo_shipment_tracking_data' ) ) return;
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
if ( isset( $_POST['mimo_tracking_provider_id'] ) )
update_post_meta( $post_id, 'mimo_tracking_provider_id', sanitize_text_field( $_POST['mimo_tracking_provider_id'] ) );
if ( isset( $_POST['mimo_tracking_number'] ) )
update_post_meta( $post_id, 'mimo_tracking_number', sanitize_text_field( $_POST['mimo_tracking_number'] ) );
if ( isset( $_POST['mimo_date_shipped'] ) )
update_post_meta( $post_id, 'mimo_date_shipped', sanitize_text_field( $_POST['mimo_date_shipped'] ) );
to
if ( isset( $_POST[ 'mimo_shipment_tracking_nonce' ] ) && wp_verify_nonce( $_POST[ 'mimo_shipment_tracking_nonce' ], 'mimo_shipment_tracking_data' ) ) {
if (!current_user_can('edit_post', $post_id)) return;
if (isset($_POST['mimo_tracking_provider_id']))
update_post_meta($post_id, 'mimo_tracking_provider_id', sanitize_text_field($_POST['mimo_tracking_provider_id']));
if (isset($_POST['mimo_tracking_number']))
update_post_meta($post_id, 'mimo_tracking_number', sanitize_text_field($_POST['mimo_tracking_number']));
if (isset($_POST['mimo_date_shipped']))
update_post_meta($post_id, 'mimo_date_shipped', sanitize_text_field($_POST['mimo_date_shipped']));
}
Regards, Rado
-
This reply was modified 5 years, 9 months ago by gutding.