Skip to content

WPS Migration: Add notice #60263

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

Open
wants to merge 6 commits into
base: feature/paypal-wps-migration
Choose a base branch
from

Conversation

Mayisha
Copy link
Contributor

@Mayisha Mayisha commented Aug 7, 2025

Submission Review Guidelines:

Changes proposed in this Pull Request:

  • Added the PayPal orders v2 TOS notice on admin pages.

Closes PAYPAL-32

How to test the changes in this Pull Request:

  • Set the deprecated PayPal gateway feature flag.
wp option patch update woocommerce_paypal_settings _should_load 'yes'
  • If you already have is_tos_accepted set in your woocommerce_paypal_settings, set it to no.
wp option patch update woocommerce_paypal_settings is_tos_accepted 'no'
  • Load any page in your WooCommerce admin dashboard. You should see the PayPal TOS notice.
  • Click the Agree button.
    • The notice should be hidden.
    • Run wp option get woocommerce_paypal_settings and confirm that is_tos_accepted is yes.
  • Run the following to make the notice visible again.
wp option delete show_woocommerce_paypal_tos_notice
wp option patch update woocommerce_paypal_settings is_tos_accepted 'no'
  • Click Dismiss and confirm that the notice is removed. It should not reappear on page refresh.

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Changelog Entry Comment

Comment

@Mayisha Mayisha requested a review from Copilot August 7, 2025 18:42
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Testing Guidelines

Hi @annemirasol ,

Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed.

Reminder: PR reviewers are required to document testing performed. This includes:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Aug 7, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a Terms of Service (TOS) notice for PayPal Orders v2 migration that appears on WooCommerce admin pages. The notice requires administrators to accept updated terms before continuing to use PayPal Standard.

  • Creates a new notice system for PayPal TOS acceptance with agree/dismiss functionality
  • Modifies the PayPal gateway to expose the WPCOM registration method publicly
  • Integrates the notice handler into the gateway initialization process

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
class-wc-gateway-paypal-notices.php New file implementing the TOS notice display logic, user action handling, and integration with payments settings page
class-wc-gateway-paypal.php Changes method visibility and adds notice handler initialization

Copy link
Contributor

github-actions bot commented Aug 7, 2025

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@Mayisha Mayisha requested a review from annemirasol August 8, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant