Skip to content

Delay usage of get_plugin_name() in payment gateway privacy class to after init #764

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

agibson-godaddy
Copy link
Contributor

@agibson-godaddy agibson-godaddy commented May 1, 2025

Release: #763

Summary

This is another change to fix "translations loaded too early". This impacts plugins that use the privacy class. It delays some of the logic until after init. I followed WooCommerce core's lead a bit here: https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/includes/class-wc-privacy.php#L32-L36

Details

QA

  1. Update a payment gateway plugin to use this branch -- e.g. https://github.com/gdcorp-partners/woocommerce-gateway-authorize-net-cim/pull/113
  2. Go to Tools > Export Personal Data and submit an export for someone who has placed an order with that gateway.
  3. Download the file.
  4. Open the index.html file
    • You see "Authorize.Net Credit Card Payment Tokens" at the top
  5. Click it
    • Data is present

image

image

Before merge

  • I have confirmed these changes in each supported minor WooCommerce version

@agibson-godaddy agibson-godaddy self-assigned this May 1, 2025
@agibson-godaddy agibson-godaddy marked this pull request as ready for review May 1, 2025 12:01
@agibson-godaddy agibson-godaddy merged commit 478d3ca into release/5.15.9 May 1, 2025
5 checks passed
@agibson-godaddy agibson-godaddy deleted the chore/translations-early-privacy branch May 1, 2025 12:01
@agibson-godaddy agibson-godaddy mentioned this pull request May 1, 2025
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.

1 participant