Skip to content

Refactor logic when adding new attribute on product page load #38917

@louwie17

Description

@louwie17

Prerequisites (mark completed items with an [x]):

Issue Description:

There has been a couple back to back issues in relation to some code that auto adds an attribute to new products. See this last issue and the fix.
One problem is that if the attribute creation request fails for any reason we get a alert that the attribute failed to create, this can be confusing for the user if they just loaded the product add new page. We would only want to limit this to when a user manually adds an attribute.

The main goal of the issue is to look at the code, see if things could be simplified, in order to prevent more edge cases for bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: woocommerceIssues related to the WooCommerce Core plugin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions