Support » Plugin: WooCommerce » Missing non variable attributes in WC_Order

  • Resolved fjrial

    (@fjrial)


    I have a variable product with some variable attributes, but also have a non variable attribute (fixed one for all variations).

    On checkout, I need to make some custom actions based on this attribute, but I can not find it in the wc_order.

    If I set my product to non variable.. I can get all attributes easily with $wc_product->attributes

Viewing 1 replies (of 1 total)
  • fjrial

    (@fjrial)

    OK, found it.. after a lot of searching

    get_post_meta( $wc_product->id , ‘_product_attributes’ );

    gives me a full array with all attributes defined in the product.

Viewing 1 replies (of 1 total)
  • The topic ‘Missing non variable attributes in WC_Order’ is closed to new replies.