• Resolved D U Enoch

    (@eugyenoch)


    I would love to rename the pay-by-check payment method and change it’s default order status to pending.(The current default is good too but I would love to use “Pending” and also some custom display message, on this particular website).

    Don’t mind custom code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Jahid

    (@jahidhasan018)

    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.
    Plugin Support Jarryd Long

    (@jarryd-long)

    Thank you for your feedback and contributing towards this topic @jahidhasan018

    Plugin Support Jarryd Long

    (@jarryd-long)

    Because there have not been any recent updates to this topic, we will be changing the status to resolved.

    If you’re enjoying Paid Memberships Pro, would you mind rating it 5-stars to help spread the word? https://www.ads-software.com/support/plugin/paid-memberships-pro/reviews/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pay-by-check to pay-by-bank’ is closed to new replies.