• Resolved loopforever

    (@loopforever)


    Hello good day.
    I am using Woocommerce bulk product upload structure (import/export).
    I want to know if the following scenario is possible.

    I have attributes named X, Y and Z.
    X attribute 1,2,3
    Y attribute a,b,c
    Z attribute k,l,m
    values are stored. So these are defined from wp-admin before.

    E.g; X is Brand and value 1 is Woocommerce.
    As you know, an attribute value that is not in the csv file can be added. For example, the value 4 to the X attribute.

    Here, I want to block this for some attributes. For example, a non-existent value such as 4 should be added to the X attribute.
    However, values should not be added to the Y (or Z) attribute other than the ones defined.

    I hope you understand the scenario.

    1-) Can this inspection be done?
    2-) If yes, in which file and in which function should I call it?
    I would be glad if you guide me.
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @loopforever,

    a non-existent value such as 4 should be added to the X attribute.
    However, values should not be added to the Y (or Z) attribute other than the ones defined.

    It sounds like you want to programmatically add a certain value to an X attribute. You might want to take a look at this Stack Overflow thread where you can get inspiration for your custom code:

    https://stackoverflow.com/questions/58942156/woocommerce-programmatically-add-product-attributes-and-their-corresponding-valu

    If this is not what you’ve been searching for, and since custom coding goes beyond the scope of support we are able to provide in this forum, we recommend hiring a developer that can help create this portion of code. There are freelance developers at Codeable who would be happy to help you out: https://woocommerce.com/codeable/.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution and the above resources for developers were helpful. If you have further questions, please feel free to open a new topic.

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

The topic ‘Import/Export Control-Defined Attribute Inspection’ is closed to new replies.