Forum Replies Created
- AuthorPosts
- EliITParticipant
No, I’m not able to fix it. I just remember, after ajax success message, to go to the Shipping tab and click to the update button (the fields remain in the correct value if I not refresh the page). If refresh the page I have to set the correct values.
This thing is very risky, because if the changes are made by a collaborator who does not know that the values that appear in the shipping tab are actually reset, we risk to have a seller being unable to sell.
I think this is a serious bugMay 26, 2020 at 3:23 pm in reply to: Field '_wcfmmp_shipping' is reset on 'wcfm_vendor_settings_update' #135361EliITParticipantI’ve the same issue and WCFM Admin Setting -> Shipping Setting -> it’s ON
Saving general settings clean the shipping settingWCFM – WooCommerce Frontend Manager – Ultimate 6.5
WCFM – WooCommerce Multivendor Marketplace 3.4
WooCommerce 4.1.1I thought it could be this code in my functions.php but deleting it the problem persists
add_filter( 'wcfm_marketplace_settings_fields_general', function( $setting_fields, $vendor_id ) { if( !wcfm_is_vendor() ) { if( !isset( $setting_fields['banner'] ) ) {//with this I exclude that it is entering the banner settings, otherwise it repeats the field $wcfm_min_order_amt = get_user_meta( $vendor_id, '_wcfm_min_order_amt', true ); $setting_fields['_wcfm_min_order_amt'] = array( 'label' => __('Importo minimo per l\'ordine', 'wc-frontend-manager'), 'type' => 'select', 'options' => array( '' => 0, '19' => '19', '29' => '29', '39' => '39', '49' => '49', '99' => '99' ), 'class' => 'wcfm-select wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $wcfm_min_order_amt ); $wcfm_min_order_qty = get_user_meta( $vendor_id, '_wcfm_min_order_qty', true ); $setting_fields['_wcfm_min_order_qty'] = array( 'label' => __('La quantità minima per l\'ordine', 'wc-frontend-manager'), 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $wcfm_min_order_qty ); } } return $setting_fields; }, 20, 2 ); add_action( 'wcfm_vendor_settings_update', function( $vendor_id, $wcfm_settings_form ) { global $WCFM, $WCFMmp; if( isset( $wcfm_settings_form['_wcfm_min_order_amt'] ) ) { $wcfm_min_order_amt = $wcfm_settings_form['_wcfm_min_order_amt']; update_user_meta( $vendor_id, '_wcfm_min_order_amt', $wcfm_min_order_amt ); } if( isset( $wcfm_settings_form['_wcfm_min_order_qty'] ) ) { $wcfm_min_order_qty = $wcfm_settings_form['_wcfm_min_order_qty']; update_user_meta( $vendor_id, '_wcfm_min_order_qty', $wcfm_min_order_qty ); } }, 500, 2 );
- AuthorPosts