Fix for 'PHP Warning: Undefined variable $fb_product_parent'#2976
Closed
mshymon wants to merge 1 commit intofacebook:mainfrom
Closed
Fix for 'PHP Warning: Undefined variable $fb_product_parent'#2976mshymon wants to merge 1 commit intofacebook:mainfrom
mshymon wants to merge 1 commit intofacebook:mainfrom
Conversation
Contributor
|
@mshymon has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
tzahgr
pushed a commit
that referenced
this pull request
Apr 1, 2025
Summary: ## Description There is an issue raised in the WordPress forum (https://wordpress.org/support/topic/undefined-variable-fb_product_parent-in-webroot-wp-content-plugins-facebook-fo/) about PHP warning in debug log: `PHP Warning: Undefined variable $fb_product_parent in /bitnami/wordpress/wp-content/plugins/facebook-for-woocommerce/includes/fbproductfeed.php on line 335`. This PR fixing the issue. ### Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## Screenshots ### Before Logs contains the PHP Warning after I trigger feed file generation. <img width="2857" alt="Screenshot 2025-03-27 at 15 47 42" src="https://github.com/user-attachments/assets/b626ab60-4bc4-4901-8106-67f38000d4a4" /> ### After Logs do not contains the PHP Warning after I trigger feed file generation. <img width="2859" alt="Screenshot 2025-03-27 at 15 49 44" src="https://github.com/user-attachments/assets/3f9aaa74-72ed-4d6b-9e89-c854cc0a0c58" /> ## Test instructions Manually trigger feed file generation (WooCommerce => Status => Scheduled Actions => wc_facebook_regenerate_feed) and monitor debug logs via "WP Console" tool. ## Checklist - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Fix for 'PHP Warning: Undefined variable $fb_product_parent' Pull Request resolved: #2976 Reviewed By: devbodaghe Differential Revision: D71979661 Pulled By: mshymon fbshipit-source-id: e2af1ff2def0beab1693c8f7d520ff70a15a9528
SayanPandey
pushed a commit
to SayanPandey/facebook-for-woocommerce
that referenced
this pull request
Apr 1, 2025
…k#2976) Summary: ## Description There is an issue raised in the WordPress forum (https://wordpress.org/support/topic/undefined-variable-fb_product_parent-in-webroot-wp-content-plugins-facebook-fo/) about PHP warning in debug log: `PHP Warning: Undefined variable $fb_product_parent in /bitnami/wordpress/wp-content/plugins/facebook-for-woocommerce/includes/fbproductfeed.php on line 335`. This PR fixing the issue. ### Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## Screenshots ### Before Logs contains the PHP Warning after I trigger feed file generation. <img width="2857" alt="Screenshot 2025-03-27 at 15 47 42" src="https://github.com/user-attachments/assets/b626ab60-4bc4-4901-8106-67f38000d4a4" /> ### After Logs do not contains the PHP Warning after I trigger feed file generation. <img width="2859" alt="Screenshot 2025-03-27 at 15 49 44" src="https://github.com/user-attachments/assets/3f9aaa74-72ed-4d6b-9e89-c854cc0a0c58" /> ## Test instructions Manually trigger feed file generation (WooCommerce => Status => Scheduled Actions => wc_facebook_regenerate_feed) and monitor debug logs via "WP Console" tool. ## Checklist - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Fix for 'PHP Warning: Undefined variable $fb_product_parent' Pull Request resolved: facebook#2976 Reviewed By: devbodaghe Differential Revision: D71979661 Pulled By: mshymon fbshipit-source-id: e2af1ff2def0beab1693c8f7d520ff70a15a9528
This was referenced Apr 2, 2025
Merged
This was referenced Apr 10, 2025
Closed
Closed
mradmeta
pushed a commit
that referenced
this pull request
Apr 14, 2025
Summary: ## Description There is an issue raised in the WordPress forum (https://wordpress.org/support/topic/undefined-variable-fb_product_parent-in-webroot-wp-content-plugins-facebook-fo/) about PHP warning in debug log: `PHP Warning: Undefined variable $fb_product_parent in /bitnami/wordpress/wp-content/plugins/facebook-for-woocommerce/includes/fbproductfeed.php on line 335`. This PR fixing the issue. ### Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) ## Screenshots ### Before Logs contains the PHP Warning after I trigger feed file generation. <img width="2857" alt="Screenshot 2025-03-27 at 15 47 42" src="https://github.com/user-attachments/assets/b626ab60-4bc4-4901-8106-67f38000d4a4" /> ### After Logs do not contains the PHP Warning after I trigger feed file generation. <img width="2859" alt="Screenshot 2025-03-27 at 15 49 44" src="https://github.com/user-attachments/assets/3f9aaa74-72ed-4d6b-9e89-c854cc0a0c58" /> ## Test instructions Manually trigger feed file generation (WooCommerce => Status => Scheduled Actions => wc_facebook_regenerate_feed) and monitor debug logs via "WP Console" tool. ## Checklist - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Fix for 'PHP Warning: Undefined variable $fb_product_parent' Pull Request resolved: #2976 Reviewed By: devbodaghe Differential Revision: D71979661 Pulled By: mshymon fbshipit-source-id: e2af1ff2def0beab1693c8f7d520ff70a15a9528
This was referenced Apr 18, 2025
This was referenced May 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There is an issue raised in the WordPress forum (https://wordpress.org/support/topic/undefined-variable-fb_product_parent-in-webroot-wp-content-plugins-facebook-fo/) about PHP warning in debug log:
PHP Warning: Undefined variable $fb_product_parent in /bitnami/wordpress/wp-content/plugins/facebook-for-woocommerce/includes/fbproductfeed.php on line 335.This PR fixing the issue.
Type of change
Please delete options that are not relevant.
Screenshots
Before
Logs contains the PHP Warning after I trigger feed file generation.

After
Logs do not contains the PHP Warning after I trigger feed file generation.

Test instructions
Manually trigger feed file generation (WooCommerce => Status => Scheduled Actions => wc_facebook_regenerate_feed) and monitor debug logs via "WP Console" tool.
Checklist
Changelog entry
Fix for 'PHP Warning: Undefined variable $fb_product_parent'