• Resolved djbeesley

    (@djbeesley)


    Hi team, is there any way to change month’s names to month numbers? Like January to 1 and December to 12 in the Credit/Debit card details.

    Using Authorized.net for payment gateway.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support alexrollin

    (@alexrollin)

    Hello,

    We are checking into this and will get back to you with an update!

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    we’ve checked into this and there isn’t an easy fix for this, unfortunately. We will add a task to look into it further for a future release, though.

    Plugin Contributor Brian Mutende

    (@picocodes)

    We’ve added a getpaid_cc_months filter that you can use when we release the next update.

    Thread Starter djbeesley

    (@djbeesley)

    thank you

    Thread Starter djbeesley

    (@djbeesley)

    Hi @picocodes

    how can use this hook?

    Plugin Contributor Brian Mutende

    (@picocodes)

    Use the following code snippet.

    add_filter( 'getpaid_cc_months', function() {
    
    	return array(
    		'01' => 1,
    		'02' => 2,
    		'03' => 3,
    		'04' => 4,
    		'05' => 5,
    		'06' => 6,
    		'07' => 7,
    		'08' => 8,
    		'09' => 9,
    		'10' => 10,
    		'11' => 11,
    		'12' => 12,
    	);
    
    });

    https://github.com/AyeCode/invoicing/blob/master/includes/gateways/class-getpaid-payment-gateway.php#L489

    Thread Starter djbeesley

    (@djbeesley)

    Thank you for quick help.

    Thread Starter djbeesley

    (@djbeesley)

    Hi @picocodes

    I want to add 0 before month number 1 to 9 but it gives me an error after number 7.

    “Invalid numeric literal”

    So Now I am using code like this:

    return array( ’01’ => __( ’01’, ‘invoicing’ ),
    ’02’ => __( ’02’, ‘invoicing’ ),
    ’03’ => __( ’03’, ‘invoicing’ ),
    ’04’ => __( ’04’, ‘invoicing’ ),
    ’05’ => __( ’05’, ‘invoicing’ ),
    ’06’ => __( ’06’, ‘invoicing’ ),
    ’07’ => __( ’07’, ‘invoicing’ ),
    ’08’ => __( ’08’, ‘invoicing’ ),
    ’09’ => __( ’09’, ‘invoicing’ ),
    ’10’ => __( ’10’, ‘invoicing’ ),
    ’11’ => __( ’11’, ‘invoicing’ ),
    ’12’ => __( ’12’, ‘invoicing’ ),
    );

    Just wanted to check if this is the correct way to use the code.

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Want to change months name to numeric value’ is closed to new replies.