Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created March 21, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/0c827e3ae1415bfb4d2eab65ed4fedcb to your computer and use it in GitHub Desktop.
Save Shelob9/0c827e3ae1415bfb4d2eab65ed4fedcb to your computer and use it in GitHub Desktop.
Caldera Forms.com -> wp-content/mu-plugins/edd_recurring_create_subscription_args.php
<?php
/**
* Limit the length of the subscription name if using auth.net
*/
add_filter( 'edd_recurring_create_subscription_args', function(
$args,
$downloads,
$gatewayId
) {
if( 'authorize' === $gatewayId ){
$args[ 'subscription' ]['name' ] = substr(
$args[ 'subscription' ]['name' ],
0,
20
);
}
return $args;
},10,3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment