Created
December 30, 2013 11:04
-
-
Save mikejolley/8180728 to your computer and use it in GitHub Desktop.
Strip tags from item names sent to paypal
This file contains 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( '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