To Rename “Pay By Check”
It is possible to rename the “Pay By Check” to “Pay by Bank Transfer”, or something else here is a code snippet that helps you achieve this –?https://gist.github.com/travislima/012893d789e57b5055bbc1570753ebf6#file-pmpro_change_pay_by_check-php
/**
* @link https://codex.www.ads-software.com/Plugin_API/Filter_Reference/gettext
* A simple gist that changes "Pay by Check" to "Pay by Cheque or Bank Transfer:".
* Copy the code below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Pay by Check' :
$translated_text = __( 'Pay by Cheque or Bank Transfer', 'paid-memberships-pro' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_pmpro_text_strings', 20, 3 );
How to change Default order status
You may be able to use the Paid Memberships Pro – Pay By Check Add On which will automatically achieve this for you.
Here is the code that achieves this – https://github.com/strangerstudios/pmpro-pay-by-check/blob/dev/pmpro-pay-by-check.php#L407-L423
/*
Handle pending check payments
*/
//add pending as a default status when editing orders
function pmpropbc_pmpro_order_statuses($statuses)
{
if(!in_array('pending', $statuses))
{
$statuses[] = 'pending';
}
return $statuses;
}
add_filter('pmpro_order_statuses', 'pmpropbc_pmpro_order_statuses');
-
This reply was modified 1 year, 4 months ago by
Jahid.
-
This reply was modified 1 year, 4 months ago by
Jahid. Reason: add code
-
This reply was modified 1 year, 4 months ago by
Jahid.