Action: tcp product metabox save custom fields

Description

The “tcp_product_metabox_save_custom_fields” action is used to save custom fields, usually added using tcp_product_metabox_custom_fields and tcp_product_metabox_custom_fields_after_price actions.

Example

<?php
function tcp_product_metabox_save_custom_fields( $post_id ) {
	$other_field = isset( $_POST['other_field'] ) ? (float)$_POST['other_field'] : 0;
	update_post_meta( $post_id, 'other_field', $other_field );
}

add_action( 'tcp_product_metabox_save_custom_fields', 'tcp_product_metabox_save_custom_fields' );

Change Log

Since 1.0.8

Related

tcp_product_metabox_custom_fields | tcp_product_metabox_custom_fields_after_price