Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created December 30, 2013 11:04
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 mikejolley/8180728 to your computer and use it in GitHub Desktop.
Save mikejolley/8180728 to your computer and use it in GitHub Desktop.
Strip tags from item names sent to paypal
add_filter( 'woocommerce_paypal_args', 'custom_woocommerce_paypal_args' );
function custom_woocommerce_paypal_args( $args ) {
foreach ( $args as $key => $arg ) {
if ( strstr( $key, 'item_name_' ) ) {
$args[ $key ] = strip_tags( $arg );
}
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment