Skip to content

Enhanced Onboarding using MICE#2896

Closed
sol-loup wants to merge 42 commits intomainfrom
MICE-4
Closed

Enhanced Onboarding using MICE#2896
sol-loup wants to merge 42 commits intomainfrom
MICE-4

Conversation

@sol-loup
Copy link
Copy Markdown
Contributor

@sol-loup sol-loup commented Feb 24, 2025

MICE-4 Branch Changes Summary

Overview

Implements Meta Integrated Commerce Extension (MICE) for Facebook for WooCommerce.

Key Changes

  1. New MetaExtension Handler (includes/Handlers/MetaExtension.php)

    • REST API endpoints for MICE communication
    • Token management and settings storage
    • iframe URL generation
  2. Enhanced Connection Screen (includes/Admin/Settings_Screens/Connection.php)

    • iframe-based onboarding flow
    • Message handler for iframe communication
    • Event processing for MICE
  3. Unit Tests

    • ConnectionTest.php and MetaExtensionTest.php

Technical Details

  • REST endpoints:

    • /wp-json/wc-facebook/v1/update_fb_settings
    • /wp-json/wc-facebook/v1/uninstall
  • Settings stored in WP options with wc_facebook_ prefix

How to Enable

The feature is disabled by default. To enable, modify the use_enhanced_onboarding() method in facebook-commerce.php:

// Line 3029 in facebook-commerce.php
public function use_enhanced_onboarding() {
    return true; // Change from false to true
}

Testing

Screenshot 2025-02-18 at 4 50 07 PM Screenshot 2025-02-06 at 4 39 16 PM Screenshot 2025-02-06 at 4 38 58 PM

UI Flow

  1. WooCommerce marketing icon → Facebook → Connections tab
  2. Onboard through MBE
  3. Verify MICE management page appears

Technical Testing

./vendor/bin/phpunit --filter "ConnectionTest|MetaExtension"

Expected Behavior

  • iframe loads and resizes dynamically
  • Settings save after connection
  • Management interface displays post-connection
  • Uninstall clears settings

Preliminary diff (using some Magento public primitives) allowing MICE Splash Page to be loaded in WooC Extension

Next steps:

1. Implement token storage
2. Implement MICE Management page
Preliminary diff (using some Magento public primitives) allowing MICE Splash Page to be loaded in WooC Extension

Next steps:

1. Implement token storage
2. Implement MICE Management page
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@sol-loup sol-loup closed this Feb 26, 2025
@sol-loup sol-loup reopened this Feb 26, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@sol-loup sol-loup changed the title MICE 4 Enhanced Onboarding using MICE Feb 27, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

Updating some MBE params used by MiCE solution
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@sol-loup merged this pull request in a1f144e.

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.

4 participants