Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Created November 8, 2021 15:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dparker1005/65d377b4580c4ca896cbff43a9128129 to your computer and use it in GitHub Desktop.
Save dparker1005/65d377b4580c4ca896cbff43a9128129 to your computer and use it in GitHub Desktop.
Disables the `pmpro_send_200_http_response()` function.
<?php
// Copy from below here...
/**
* Disables the `pmpro_send_200_http_response()` function.
*
* That function was implemented in PMPro v2.6.4 to allow IPN/webhook
* handlers to adknowledge the receipt of a webhook before processing
* it in order to avoid timeout issues at the gateway.
*
* This code recipe should be used in cases where gateways are showing that
* PMPro returned an error for a webhook, even though the webhook was processed properly.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_filter( 'pmpro_send_200_http_response', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment