Skip to content

Instantly share code, notes, and snippets.

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 webdados/7ed3b915cd98d8b2122ed6179e926b59 to your computer and use it in GitHub Desktop.
Save webdados/7ed3b915cd98d8b2122ed6179e926b59 to your computer and use it in GitHub Desktop.
Allowed pending status for ifthenpay's Multibanco and MB Way callbacks
<?php
add_filter( 'multibanco_ifthen_valid_callback_pending_status', 'ifthen_valid_callback_pending_status' );
add_filter( 'mbway_ifthen_valid_callback_pending_status', 'ifthen_valid_callback_pending_status' );
function ifthen_valid_callback_pending_status( $status ) {
$status[] = 'wc-on-hold'; //Add "wc-on-hold"
$status[] = 'wc-pending'; //Add "wc-pending"
return $status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment