Skip to content
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

CANTINA-953: Add vip_block_wp_mail filter #4975

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Oct 25, 2023

Description

This PR introduces a filter vip_block_wp_mail which can be used on the application level in client-mu-plugins to disable email. However, the existing constant VIP_BLOCK_WP_MAIL which is for VIP internal use will take precedence.

Changelog Description

Filter Added: vip_block_wp_mail

New filter vip_block_wp_mail which can be used on the application level in client-mu-plugins to disable email.

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

  1. Use add_filter( 'vip_block_wp_mail','__return_true ); in client-mu-plugins
  2. expect Noop Mailer

@rebeccahum rebeccahum changed the title Add vip_block_wp_mail filter CANTINA-953: Add vip_block_wp_mail filter Oct 25, 2023
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #4975 (3bdd36e) into develop (09fffbe) will increase coverage by 0.33%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##             develop    #4975      +/-   ##
=============================================
+ Coverage      28.48%   28.81%   +0.33%     
- Complexity      4742     4743       +1     
=============================================
  Files            278      278              
  Lines          20904    20907       +3     
=============================================
+ Hits            5954     6025      +71     
+ Misses         14950    14882      -68     
Files Coverage Δ
vip-mail.php 75.26% <100.00%> (+4.15%) ⬆️

... and 14 files with indirect coverage changes

@rebeccahum rebeccahum marked this pull request as ready for review October 25, 2023 19:19
@rebeccahum rebeccahum requested a review from a team as a code owner October 25, 2023 19:19
@rebeccahum rebeccahum force-pushed the add/filter_vip_block_wp_mail branch from f1e9943 to 7efe2b1 Compare October 25, 2023 19:23
@rebeccahum rebeccahum force-pushed the add/filter_vip_block_wp_mail branch from 09e0e82 to 4edc8ff Compare October 25, 2023 20:36
Add tests
@rebeccahum rebeccahum force-pushed the add/filter_vip_block_wp_mail branch from 4edc8ff to 668bb68 Compare October 25, 2023 20:42
@rebeccahum rebeccahum added [Status] Needs Docs Signal to Yoli the docs need to be updated and removed [Status] In Progress labels Oct 25, 2023
PHP 8.2 fix for dynamic property
@rebeccahum rebeccahum merged commit d6f7a34 into develop Oct 25, 2023
@rebeccahum rebeccahum deleted the add/filter_vip_block_wp_mail branch October 25, 2023 21:58
@rebeccahum rebeccahum removed [Status] Needs Review [Status] Needs Docs Signal to Yoli the docs need to be updated labels Oct 25, 2023
@mahbubme
Copy link

There is a typo in the documentation here, can someone update this? It should be '__return_true' instead of '__return_true

@rebeccahum
Copy link
Contributor Author

Thanks @mahbubme ! This has been fixed now. cc @yolih

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.

3 participants