Skip to content

Conversation

@RadoslavGeorgiev
Copy link
Contributor

@RadoslavGeorgiev RadoslavGeorgiev commented Oct 31, 2025

Description

There were a few remaining instances of names starting with OpenAi, including the main plugin file.

This PR addresses them.

Testing instructions

  • Activate the plugin and check if there are any fatal errors.
  • npm install & composer install should not be broken.
  • npm scripts, including build should load the new main file.

Summary by CodeRabbit

  • Documentation

    • Updated plugin description to emphasize product feed functionality.
  • Chores

    • Renamed package and plugin branding from OpenAI-Product-Feed to Product-Feed-for-OpenAI.
    • Updated public package metadata and repository references.
  • Build / Tests

    • Adjusted build and test setup to load and package the renamed plugin entry.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Rename and rebrand project artifacts: update main plugin filename references, package metadata (name/title/repository), test bootstrap path, and minor PHPDoc and plugin header text across build script, tests, source, and package files.

Changes

Cohort / File(s) Summary
Build script
bin/build-prod-zip.sh
Changed copied main plugin filename from ./openai-product-feed-for-woo.php to ./woocommerce-product-feed-for-openai.php.
Test bootstrap
tests/unit/bootstrap.php
Updated mu-plugins load path from /openai-product-feed-for-woo.php to /woocommerce-product-feed-for-openai.php.
Package metadata
package.json
Renamed package @woocommerce/OpenAI-Product-Feed@woocommerce/Product-Feed-for-OpenAI, updated title, and changed repository.url to the woocommerce-product-feed-for-openai repo URL.
Plugin source & header
src/Core/Plugin.php, woocommerce-product-feed-for-openai.php
Shortened PHPDoc description in Plugin.php and updated plugin header Description (removed "AI-optimized" wording) in woocommerce-product-feed-for-openai.php.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to consistency of filename/path changes across build and test scripts.
  • Verify package.json rename matches distribution and registry expectations.
  • Confirm plugin header still contains all required WordPress header fields and correct slug/file name.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Finish renaming the plugin" directly and clearly summarizes the primary change in the changeset. The changes across multiple files (build script, package.json, plugin main file, tests, and plugin header) all center on completing a renaming from OpenAI-based naming to the new "WooCommerce-Product-Feed" naming. The title accurately reflects this main objective without being vague or misleading.
Description Check ✅ Passed The PR description includes the required Description and Testing instructions sections and adequately explains what the PR addresses (remaining OpenAI-based naming instances) and provides concrete testing steps (activation check, npm/composer verification, build script verification). However, the description is missing the Checklist section from the template, which should include checkboxes for npm run test:php and npm run lint:php verification. The core content areas are properly addressed, though the description doesn't fully adhere to the prescribed template structure.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aca319f and 2765e55.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

package.json Outdated
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/OpenAI-Product-Feed.git"
"url": "https://github.com/woocommerce/WooCommerce-Product-Feed.git"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a typo, I just don't know what the long-term repository will be. This will not be published in NPM, so we should be good.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can also the GitHub repo name too. Anyway, I prefer all characters to be lowercase: woocommerce-product-feed.

@RadoslavGeorgiev RadoslavGeorgiev marked this pull request as ready for review October 31, 2025 11:24
Copy link
Contributor

@htdat htdat left a comment

Choose a reason for hiding this comment

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

I think we should change and make it generic WooCommerce Product Feed for everything because this repo is now actually supporting product feeds for both POS and OpenAI specs.

WDYT @ebinnion ?

FILES_TO_COPY=(
"./src"
"./openai-product-feed-for-woo.php"
"./woocommerce-product-feed-for-openai.php"
Copy link
Contributor

Choose a reason for hiding this comment

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

May not use for-openai?

Suggested change
"./woocommerce-product-feed-for-openai.php"
"./woocommerce-product-feed.php"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think a big part of the current code here will go into Woo Core at some point, and this plugin will remain OpenAI-specific.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/unit/bootstrap.php (1)

6-6: Fix typo in comment.

The comment contains "constnat" instead of "constant".

Apply this diff to fix the typo:

-// Define a constnat to use in tests.
+// Define a constant to use in tests.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ac9d78 and aca319f.

📒 Files selected for processing (2)
  • src/Core/Plugin.php (1 hunks)
  • tests/unit/bootstrap.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Core/Plugin.php
🧰 Additional context used
📓 Path-based instructions (1)
**/*.php

📄 CodeRabbit inference engine (.cursorrules)

When suggesting with Tab or writing code, always obey the WordPress Coding Standards (project PHPCS config in phpcs.xml.dist)

Files:

  • tests/unit/bootstrap.php
🧠 Learnings (2)
📓 Common learnings
Learnt from: RadoslavGeorgiev
Repo: woocommerce/OpenAI-Product-Feed PR: 13
File: src/API/Controllers/ApiController.php:44-50
Timestamp: 2025-10-22T15:49:57.065Z
Learning: The ApiController in src/API/Controllers/ApiController.php is planned to be moved and refactored to be OpenAI platform-specific, which is why it currently requires concrete ProductMapper and FeedValidator implementations from the OpenAI platform rather than interface types.
📚 Learning: 2025-10-24T17:54:03.161Z
Learnt from: RadoslavGeorgiev
Repo: woocommerce/OpenAI-Product-Feed PR: 21
File: src/Utils/MemoryManager.php:35-60
Timestamp: 2025-10-24T17:54:03.161Z
Learning: In the woocommerce/OpenAI-Product-Feed repository, the MemoryManager::flush_caches() method uses aggressive cache clearing including direct $wp_object_cache property manipulation. This is an intentional, tried & tested pattern copied from another project that is necessary for generating very large product feeds (70k-200k products). Without this aggressive approach, large exports fail. The cache clearing happens after feed processing is complete, before shipping the file to another server, not during normal page execution.

Applied to files:

  • tests/unit/bootstrap.php
🔇 Additional comments (1)
tests/unit/bootstrap.php (1)

33-33: LGTM! Plugin file path updated correctly.

The path change aligns with the renaming effort described in the PR objectives and is consistent with the updates in other files (e.g., bin/build-prod-zip.sh).

@RadoslavGeorgiev
Copy link
Contributor Author

I think we should change and make it generic WooCommerce Product Feed for everything because this repo is now actually supporting product feeds for both POS and OpenAI specs.

WDYT @ebinnion ?

As I mentioned in this comment, I think that mostly Integrations/OpenAi will remain within this plugin in the near future.

Copy link
Contributor

ebinnion commented Nov 3, 2025

I think that it'll largely be OpenAI. For POS, I think that we'll want to pull stuff to Woo core.

@RadoslavGeorgiev RadoslavGeorgiev merged commit 6a1b3e8 into trunk Nov 3, 2025
1 check was pending
@RadoslavGeorgiev
Copy link
Contributor Author

If you see this message, please run this command :)

git remote set-url origin [email protected]:woocommerce/woocommerce-product-feed-for-openai.git

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants