Can anyone help me with a custom token? Willing to pay!

I chose to post in this category since it has most activities.

I’m using Client Reports to send out monthly report to my clients. I need to include month and year in the email subject line eg “Monthly report for xxx.xxx (April 2020)”

The only tokens I could use is either [report.daterange] or [report.send.date] but both will output full date and time eg “April 1, 2020 3:30 am” which makes the subject line look atrociously long.

I was told that I could create custom token, but my coding skill is limited, therefore I’m willing to pay to have someone help me.

The token I need is to output MONTH YEAR eg “April 2020”

Anyone?

Hey Dean, I checked with our dev team about this requirement, and it needs a small tweak in our extension.

If you are still in need for this, please send me a Private message so I can send you the tweaked version of the Client Reports extension.

1 Like

Hey @bogdan, any chance I could request this too, please?

Hi @huxodan, please feel free to text me via Private Message

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

For Client Reports:

add_filter( 'mainwp_client_reports_custom_tokens', 'mycustom_mainwp_client_reports_custom_tokens', 10, 3 );
function mycustom_mainwp_client_reports_custom_tokens( $tokensValues, $report, $website ) {
	if ( is_array( $tokensValues ) && isset( $tokensValues['[report.send.date]'] ) ) {
		$tokensValues['[report.send.date]'] = date( 'F Y', time() );
	}
	return $tokensValues;
}

For Pro Reports

add_filter( 'mainwp_pro_reports_custom_tokens', 'mycustom_mainwp_pro_reports_custom_tokens', 10, 3 );
function mycustom_mainwp_pro_reports_custom_tokens( $tokensValues, $report, $website ) {
	if ( is_array( $tokensValues ) && isset( $tokensValues['[report.send.date]'] ) ) {
		$tokensValues['[report.send.date]'] = date( 'F Y', time() );
	}
	return $tokensValues;
}

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.