Skip to content

Conversation

@peterwilsoncc
Copy link
Collaborator

@peterwilsoncc peterwilsoncc commented Dec 2, 2025

All Submissions:

  • Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Will this change require new documentation or changes to existing documentation?

Changes proposed in this Pull Request:

Turns off forced image updates in the update_product() method in order to respect the setting Enable to override Product images from Square.

When this setting is turned off, updates to images in Square should not replace the images in WooCommerce.

Closes https://linear.app/a8c/issue/SQUARE-202/image-override-setting-is-ignored

Steps to test the changes in this Pull Request:

  1. Go to the WooCommerce Square Settings screen
  2. Ensure the option Enable to override Product images from Square is turned off (unchecked)
  3. Create a product in the Square dashboard, https://app.squareupsandbox.com/dashboard/items/library
  4. Ensure the product has an image defined
  5. Fill out other product settings however you desire
  6. Publish the product
  7. Return to the WooCommerce Square Settings screen
  8. Click the "Import all products from square" button
  9. Click "import products" in the dialog box
  10. Wait for the syncing to complete, the product should appear in the WooCommerce Dashboard > Products section
  11. Ensure the image was imported from Square
  12. Return to the Square dashboard
  13. Edit the product created earlier
  14. Upload a new image
  15. Delete the primary image uploaded earlier, the new image will become the primary image
  16. Save the product
  17. Return to the WooCommerce Square Settings screen
  18. Click the "import all products from square button"
  19. Check "Update existing products during import" in the dialog box
  20. Click the "import products" button in the dialog box
  21. Wait for the syncing to complete
  22. Return to the product in the WooCommerce Dashboard
  23. Ensure the image has not been replaced with the new image uploaded in Square

Changelog entry

Fix - Prevent images being updated from square when the "Enable to override Product images from Square" setting is turned off.

@peterwilsoncc peterwilsoncc self-assigned this Dec 2, 2025
@peterwilsoncc peterwilsoncc requested a review from dkotter December 2, 2025 02:02
Copy link
Collaborator

@qasumitbagthariya qasumitbagthariya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Update ✅


I have verified this PR in the fix/SQUARE-202-respect-image-override-setting branch, which has been fixed and is functioning as intended.

I tested the following on this branch:

After updating the product image in Square (replacing the primary image) and re-importing with “Update existing products during import” enabled:

  • The existing product image in WooCommerce was not replaced.
  • WooCommerce retained the original product image as expected.
Screen.Recording.2025-12-15.at.5.34.08.PM.mov

Testing Environment

Details
  • WordPress: 6.9
  • Theme: Storefront 4.6.2
  • Theme: Twenty Twenty-Five 1.4
  • WooCommerce - 10.4.0
  • PHP: 8.0.30
  • Web Server: Nginx 1.20.2
  • Browser: Chrome
  • OS: macOS 15.2
  • Branch: fix/SQUARE-202-respect-image-override-setting

Steps to Test- As mentioned in the PR description.
Test Results - It is working as expected.
Functional Demo / Screencast -
Special Notes - Ready for UAT
Testing Document status:
Cases related to this Issue/PR are added to the Critical Flow Wiki pages:

  • Yes
  • Not Required/Applicable for this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants