Skip to content

Fix linter errors for ./facebook-commerce-pixel-event.php#3248

Closed
ajello-meta wants to merge 3 commits intomainfrom
phpcs-facebook-commerce-pixel-event
Closed

Fix linter errors for ./facebook-commerce-pixel-event.php#3248
ajello-meta wants to merge 3 commits intomainfrom
phpcs-facebook-commerce-pixel-event

Conversation

@ajello-meta
Copy link
Copy Markdown
Contributor

Description

This PR fixes phpcs issues in ./facebook-commerce-pixel-event.php. Comments were also added for several functions. The fixes were made manually (in conjunction with ./vendor/bin/phpcbf) to ensure that the logic remains the same. Running ./vendor/bin/phpcs:

[FILE: /Users/angeloou/Local Sites/test-site-i/app/public/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-pixel-event.php](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[FOUND 127 ERRORS AND 12 WARNINGS AFFECTING 135 LINES](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
  13 | ERROR   | [ ] Missing doc comment for class WC_Facebookcommerce_Pixel (Squiz.Commenting.ClassComment.Missing)
  41 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  62 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  65 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  70 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  71 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  73 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  77 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  81 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 [ 82 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
  85 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  86 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  89 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 [ 89 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
  93 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  95 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  96 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  97 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 108 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 122 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[ 123 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 126 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 134 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 139 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 141 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 147 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 148 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 156 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
[ 160 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 172 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 180 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 184 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 186 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 192 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 207 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 218 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 221 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 238 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 243 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 258 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 262 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 264 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 271 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 284 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 285 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 291 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 293 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 295 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 296 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 297 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$this'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 297 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 297 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$event_name'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 297 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$method'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 298 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 299 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 314 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 326 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 329 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 333 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 335 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 344 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 358 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 362 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 377 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 383 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 385 | ERROR   | [ ] All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
     |         |     (WordPress.Security.EscapeOutput.OutputNotEscaped)
 398 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 411 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 414 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 417 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 424 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 428 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 431 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 434 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 436 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 446 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[ 447 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 450 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 461 | WARNING | [ ] json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 463 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 466 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 480 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 493 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 503 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 516 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 518 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 521 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 526 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 528 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 530 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 533 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 540 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 543 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 544 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 546 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 550 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 555 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 557 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 559 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 562 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 569 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 572 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 573 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 575 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 579 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 584 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 586 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 588 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 591 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 598 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 601 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 602 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 604 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 608 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 613 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 615 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 617 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 620 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 627 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 630 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[ 631 | WARNING | [x] Loose comparisons are not allowed. Expected: "==="; Found: "==" (Universal.Operators.StrictComparisons.LooseEqual)](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
 633 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 637 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 642 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 645 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 651 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 658 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 663 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 674 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 676 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 677 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 678 | ERROR   | [x] Line indented incorrectly; expected 4 tabs, found 5 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 680 | ERROR   | [x] Line indented incorrectly; expected 4 tabs, found 5 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 681 | ERROR   | [x] Line indented incorrectly; expected 3 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 682 | ERROR   | [x] Line indented incorrectly; expected 2 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 685 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 692 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 694 | ERROR   | [x] Line indented incorrectly; expected 1 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 695 | ERROR   | [x] Line indented incorrectly; expected 0 tabs, found 1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[PHPCBF CAN FIX THE 123 MARKED SNIFF VIOLATIONS AUTOMATICALLY](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------](https://woo2.staging.magento-commerce-extension-testing.com/wp-admin/)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Syntax change (non-breaking change which fixes code modularity, linting or phpcs issues)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected

Test Plan

  1. Run ./vendor/bin/phpcs, you should get:
FILE: /Users/angeloou/Local Sites/test-site-i/app/public/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-pixel-event.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 127 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
 128 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
 167 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
 461 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
 462 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
 476 | WARNING | json_encode() is discouraged. Use wp_json_encode() instead. (WordPress.WP.AlternativeFunctions.json_encode_json_encode)
-----------------------------------------------------------------------------------------------------------------------------------------
  1. Run extension and test the basic functionality to ensure everything still works as intended.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 27, 2025

📦 Latest Plugin Build

Built at: 2025-05-29T16:25:59.061Z
Commit: ce2e606
Size: 1.1M

Download: Click here to download the plugin

To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ajello-meta 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

@ajello-meta 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

@ajello-meta merged this pull request in 39898f2.

@tzahgr tzahgr mentioned this pull request Jun 4, 2025
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