Skip to content

Feature : Product Attribute Mapper #3234

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

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

devbodaghe
Copy link
Contributor

@devbodaghe devbodaghe commented May 23, 2025

Description

This PR introduces the Product Attribute Mapper functionality in the Facebook for WooCommerce plugin. The changes enhance the mapping system between WooCommerce product attributes and Facebook catalog fields, providing better support for custom attributes and improved attribute value normalization.

Key improvements include:

  • Enhanced attribute mapping system with support for custom field mappings
  • Improved normalization of attribute values (gender, age_group, condition)
  • Better handling of unmapped attributes as custom_data
  • Optimized performance through caching of custom mappings
  • Added comprehensive unit tests for attribute mapping functionality

Type of change

  • New feature (non-breaking change which adds functionality)
  • Syntax change (non-breaking change which fixes code modularity, linting or phpcs issues)

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
  • I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors.
  • I followed general Pull Request best practices.
  • I have added tests and all the new and existing unit tests pass locally with my changes.
  • I have completed dogfooding and QA testing to ensure it does not break existing functionality.
  • I have updated plugin documentations with the new attribute mapping features.

Changelog entry

Enhanced product attribute mapping system with improved support for custom fields and value normalization.

Test Plan

  1. Custom Attribute Mapping Test

    • Create products with various custom attributes
    • Map custom attributes to Facebook fields through the UI
    • Verify mappings are correctly saved and applied
    • Test attribute value normalization for gender, age_group, and condition
  2. Unit Tests

    • Run all new unit tests for attribute mapping
    • Verify existing tests pass without regression
    • Check code coverage for new functionality

Screenshots

After

Screenshot 2025-05-23 at 16 32 06 Screenshot 2025-05-23 at 16 31 54

@facebook-github-bot
Copy link
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@devbodaghe devbodaghe force-pushed the feat/attribute-mapper branch 3 times, most recently from 0a47abe to d6312bb Compare June 2, 2025 17:02
@facebook-github-bot
Copy link
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@devbodaghe devbodaghe force-pushed the feat/attribute-mapper branch from 1ad7419 to dd7b9e8 Compare June 4, 2025 19:09
@facebook-github-bot
Copy link
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

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.

2 participants