title: How to update a custom attribute of Magento Customer programatically?
body: <p>I added a new custom attribute for Customer using below code.</p>
  
  <pre><code>$installer = $this;
  $installer-&gt;startSetup();
  $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
  $entityTypeId = $setup-&gt;getEntityTypeId('customer');
  $attributeSetId = $setup-&gt;getDefaultAttributeSetId($entityTypeId);
  $attributeGroupId = $setup-&gt;getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
  $installer-&gt;addAttribute("customer", "stripe_customer_id", array(
      "type" =&gt; "varchar",
      "backend" =&gt; "",
      "label" =&gt; "Stripe ID",
      "input" =&gt; "text",
      "source" =&gt; "",
      "visible" =&gt; true,
      "required" =&gt; false,
      "default" =&gt; "",
      "frontend" =&gt; "",
      "unique" =&gt; false,
  ));
  $attribute = Mage::getSingleton("eav/config")-&gt;getAttribute("customer", "stripe_customer_id");
  $setup-&gt;addAttributeToGroup(
          $entityTypeId, $attributeSetId, $attributeGroupId, 'stripe_customer_id', '999'  //sort_order
  );
  $used_in_forms = array();
  $used_in_forms[] = "adminhtml_customer";
  $attribute-&gt;setData("used_in_forms", $used_in_forms)
          -&gt;setData("is_used_for_customer_segment", true)
          -&gt;setData("is_system", 0)
          -&gt;setData("is_user_defined", 1)
          -&gt;setData("is_visible", 1)
          -&gt;setData("sort_order", 100)
  ;
  $attribute-&gt;save();
  $installer-&gt;endSetup();
  </code></pre>
  
  <p>I can see the new attribute field in Magento admin.</p>
  
  <p><img src="https://i.stack.imgur.com/f8Z6V.png" alt="Custom Customer attribute"></p>
  
  <p>Now when I try to update the custom attribute on checkout using below code</p>
  
  <pre><code>$order = $payment-&gt;getOrder();
  $customer = Mage::getModel('customer/customer')-&gt;load($order-&gt;getCustomerId());
  $customer-&gt;setWebsiteId(Mage::app()-&gt;getWebsite()-&gt;getId());
  $customer-&gt;setStripeCustomerId('887475748');
  try {
      $customer-&gt;save();
      print('Saved: '.$customer-&gt;getStripeCustomerId());
  } catch (Exception $ex) {
     Mage::throwException($ex-&gt;getMessage());
  }
  </code></pre>
  
  <p>Above code prints 'Saved: 887475748' and never throws any exception. That means the customer is saving without any error, but when I see the info on admin panel there is nothing in the field. </p>
  
  <p>Note: I refreshed Magento cache several time, flushed cache storage and flushed Magento cache, but no success. </p>
  
  <p>Can someone please help me if I'm missing something here?</p>