Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fails when Dynamic Options used by Variations #231

Open
faisal-alvi opened this issue Oct 29, 2024 · 1 comment · May be fixed by #235
Open

Sync fails when Dynamic Options used by Variations #231

faisal-alvi opened this issue Oct 29, 2024 · 1 comment · May be fixed by #235
Assignees
Labels
priority: high The issue/PR is high priority—if affect lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@faisal-alvi
Copy link
Member

faisal-alvi commented Oct 29, 2024

When Woo is set as SOR, the sync fails when the dynamic options are used by a variable product. The plugin tries to update the variation name but it is not allowed when the variations use dynamic options. Even at the Square dashboard, we can not edit it.

Image

Here is the logged error:

Image

(
            [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
            [code:Square\Models\Error:private] => INVALID_VALUE
            [detail:Square\Models\Error:private] => Invalid object: Invalid Object with Id: XRYU7OMNCTNVD652UI4JENFD
[merchant_token=ML8ES32FTDWFZ] Item variation names may not be edited if they use item options (requested name "trunk-dynamic-options-variable-product woo02 - Red", actual name "Red"). Variation ID `XRYU7OMNCTNVD652UI4JENFD`.
            [field:Square\Models\Error:private] => 
)

We should skip updating the variation name here:

$variation_data->setName( $product->get_name() );

@faisal-alvi faisal-alvi added the type: bug The issue is a confirmed bug. label Oct 29, 2024
@faisal-alvi faisal-alvi added this to the Future Release milestone Oct 29, 2024
@faisal-alvi
Copy link
Member Author

faisal-alvi commented Oct 29, 2024

Additionally, if variation names cannot be modified when using dynamic options, we might consider disabling the attributes tab and also restricting any changes to the dropdown values under the variations tab. This approach would help prevent confusion since a new dropdown value will never be synced to the Square side!

Image

I also noticed that if we add more variations in Woo, those aren't syncing to Square too!, so we might consider disabling the option to add/create more variations as well. It’s also worth evaluating whether removing variations should be restricted as well.

@vikrampm1 vikrampm1 added the priority: high The issue/PR is high priority—if affect lots of customers substantially, but not critically. label Oct 31, 2024
@faisal-alvi faisal-alvi self-assigned this Nov 7, 2024
@faisal-alvi faisal-alvi linked a pull request Nov 13, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high The issue/PR is high priority—if affect lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants