Support » Plugin: User Meta Manager » Conflict with Woocommerce

  • Resolved ajira86



    I use the Woocommerce plugin and in parallel your User Meta Manager plugin. All was working perfectly but I noticed something :

    When user finish an order with Woocommerce, all custom metadata entered by user who order disapear. And this even if I remove any edit form from frontend.

    Can you help me to solve it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If found a way where function umm_update_profile_fields rewrite metadata value even if no form called.

    I add condition to check if umm_nonce exists before rewriting data like this :

    function umm_update_profile_fields(){
        global $current_user;
        $saved_profile_fields = (!umm_get_option('profile_fields')) ? array() : umm_get_option('profile_fields');
        $the_user = ((isset($_REQUEST['user_id']) && !empty($_REQUEST['user_id'])) && current_user_can('add_users')) ? $_REQUEST['user_id'] : $current_user->ID;
        if(isset($_REQUEST['umm_nonce'])) {
    		foreach($saved_profile_fields as $field_name => $field_settings):
    			$field_value = (isset($_REQUEST[$field_name])) ? addslashes(htmlspecialchars(trim($_REQUEST[$field_name]))) : '';
    			update_user_meta($the_user, $field_name, $field_value);

    Woocommerce call this function (indirectly) for its metadata update (billing & shipping informations) at end of checkout.

    Can someone check if this fix is relevant ?

    Plugin Author President McCheese


    Hi, This is fixed in version 3.0.1. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflict with Woocommerce’ is closed to new replies.