Title: Attributes not saving problem
Last modified: November 7, 2018

---

# Attributes not saving problem

 *  Resolved [MarketingPont.com](https://wordpress.org/support/users/wpsos911/)
 * (@wpsos911)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/)
 * Hi,
 * I’m having trouble adding attributes via the Attribute settings menu in my woocommerce.
 * I select the attributes that I want, but they don’t seem to be saved.
 * I disable this plugin and now are is ok.
 * This problem occurs only in new products.
 * Can you help me?
 * Regards.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [klive](https://wordpress.org/support/users/klive/)
 * (@klive)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10861114)
 * Same problem…
 *  [wpeshaan](https://wordpress.org/support/users/wpeshaan/)
 * (@wpeshaan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10868207)
 * HI [@klive](https://wordpress.org/support/users/klive/), [@wpsos911](https://wordpress.org/support/users/wpsos911/),
 * Could you record me reproducing your issue using tool like this? https://www.
   useloom.com
    It helps me to quickly figure out issue and squash it with immediately.
 * Thank you
 *  [1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/)
 * (@1stwebdesigns)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10875412)
 * Same issue here, just upgraded to the latest version of Woocommerce.
 * Now when you save attributes, they disappear. If you reload the page it appears
   they have saved, and they come back.
 * Disabling the plugin makes things work again as they should in the admin
 *  [1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/)
 * (@1stwebdesigns)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10875537)
 * To clarify this happens on the Edit Product screen. You can assign and save attributes
   to a product. They do indeed save, but the attributes appear to refresh via ajax
   and are blank. If you reload the page in full, the attributes come back.
 * I have tracked this issue down to line 201 of the file includes/class-admin.php:
 * global $thepostid;
 * It appears that $thepostid is an integer when the edit page is first loaded, 
   but after saving the attributes, they refresh via ajax and $thepostid is then
   null.
 * A very quick work around which seems to work for me is to add, directly below“
   global $thepostid” the following:
 * global $thepostid;
    if ( ! $thepostid ) { $thepostid = $_POST[‘post_id’]; }
 *  [1stwebdesigns](https://wordpress.org/support/users/1stwebdesigns/)
 * (@1stwebdesigns)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10876322)
 * Sorry, wrong plugin! My solution is for this plugin: [https://wordpress.org/plugins/variation-swatches-for-woocommerce/](https://wordpress.org/plugins/variation-swatches-for-woocommerce/)
 *  [grantog](https://wordpress.org/support/users/grantog/)
 * (@grantog)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10878425)
 * Same problem! : (
 *  [grantog](https://wordpress.org/support/users/grantog/)
 * (@grantog)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10878430)
 * This helped on one occasion: “To clarify this happens on the Edit Product screen.
   You can assign and save attributes to a product. They do indeed save, but the
   attributes appear to refresh via ajax and are blank. If you reload the page in
   full, the attributes come back.” from 1stwebdesigns above
 *  [wpeshaan](https://wordpress.org/support/users/wpeshaan/)
 * (@wpeshaan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-10882303)
 * [@grantog](https://wordpress.org/support/users/grantog/),
 * Could you record me reproducing your issue using tool like this? [https://www.useloom.com](https://www.useloom.com)
   
   It helps me to quickly figure out issue and squash it with immediately.
 * Thank you
 *  [sgridley](https://wordpress.org/support/users/sgridley/)
 * (@sgridley)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-11381099)
 * Ahmed, I am having the same problem. Here is a video of what I see.
 * [https://s.nimbusweb.me/share/2723488/6736qk3qgnxr85uqvvod](https://s.nimbusweb.me/share/2723488/6736qk3qgnxr85uqvvod)
 * Thanks,
    Sam

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Attributes not saving problem’ is closed to new replies.

 * ![](https://ps.w.org/woo-variation-swatches/assets/icon-256x256.gif?rev=3157951)
 * [Variation Swatches for WooCommerce](https://wordpress.org/plugins/woo-variation-swatches/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-variation-swatches/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-variation-swatches/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-variation-swatches/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-variation-swatches/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-variation-swatches/reviews/)

 * 9 replies
 * 6 participants
 * Last reply from: [sgridley](https://wordpress.org/support/users/sgridley/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/attributes-not-saving-problem/#post-11381099)
 * Status: resolved