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

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

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

Viewing 3 reply threads
  • Author
    Posts
    • #103048
      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
      MOHO
      Participant
      This reply has been marked as private.
    • #105782
      WCFM Forum
      Member

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

    • #105987
      MOHO
      Participant

      OK No prolbem

Viewing 3 reply threads
  • You must be logged in to reply to this topic.