Last active
October 2, 2018 10:59
-
-
Save vanbo/2c94cb7a1da9441c7097aed0573b6a22 to your computer and use it in GitHub Desktop.
Pay360 Limit Description to 255 chars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'pay360_hosted_cashier_get_parameters', 'prefix_limit_description', 10, 3 ); | |
| function prefix_limit_description($args, $order, $gateway) { | |
| // Add, remove or update a parameter | |
| // Limit the description to 252 chars and add ... at the end | |
| $args['transaction']['description'] = substr( $args['transaction']['description'], 0, ( 252 ) ) . '...'; | |
| // Always return the arguments back | |
| return $args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment