About // Adding variation field data update not work for your 3.2.8 version

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 contains 3 replies, has 2 voices, and was last updated by Avatar MOHO 2 weeks, 5 days ago.

  • Author
    Posts
  • #103048
    Avatar
    MOHO
    Participant

    // 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?

  • #103337
    Avatar
    MOHO
    Participant
    This reply has been marked as private.
  • #105782
    WCFM Forum
    WCFM Forum
    Keymaster

    If you are still having this issue then please contact us here – https://wclovers.com/woocommerce-multivendor-customization/

  • #105987
    Avatar
    MOHO
    Participant

    OK No prolbem

You must be logged in to reply to this topic.