Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › About // Adding variation field data update not work for your 3.2.8 version
- This topic has 3 replies, 2 voices, and was last updated 4 years, 10 months ago by MOHO.
- AuthorPosts
- January 21, 2020 at 8:40 pm #103048MOHOParticipant
// Adding variation field data
function wcfm_product_data_variations_mrp( $variations, $variation_id, $variation_id_key ) {
global $WCFM, $WCFMu;
if( $variation_id ) {
$variations[$variation_id_key][‘mrp_cost_price’] = get_post_meta( $variation_id, ‘mrp_cost_price’, true );
}return $variations;
}add_filter( ‘wcfm_variation_edit_data’, ‘wcfm_product_data_variations_mrp’, 100, 3 );
// Saving variation field data
function wcfm_product_variation_save_mrp( $wcfm_variation_data, $new_product_id, $variation_id, $variations, $wcfm_products_manage_form_data ) {
global $WCFM, $WCFMu;
if( $variation_id ) {
update_post_meta( $variation_id, ‘mrp_cost_price’, $variations[ ‘mrp_cost_price’ ] );}
return $wcfm_variation_data;
}add_filter( ‘wcfm_product_variation_data_factory’, ‘wcfm_product_variation_save_mrp’, 100, 5 );
when i submit, “mrp_cost_price” field not save now
Could you give me correct work code? - January 23, 2020 at 10:42 am #103337MOHOParticipantThis reply has been marked as private.
- February 6, 2020 at 3:51 pm #105782WCFM ForumMember
If you are still having this issue then please contact us here – https://wclovers.com/woocommerce-multivendor-customization/
- February 7, 2020 at 6:07 am #105987MOHOParticipant
OK No prolbem
- AuthorPosts
- You must be logged in to reply to this topic.