Swap method_exists for is_callable.

This commit is contained in:
Justin Shreve 2016-02-03 12:01:51 -08:00
parent f9b19234b0
commit 9741ab0751
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class WC_Payment_Tokens {
// contain their neccesary fields.
$is_valid = true;
$token_class = 'WC_Payment_Token_' . $args['type'];
if ( method_exists( $token_class, 'validate' ) ) {
if ( is_callable( $token_class, 'validate' ) ) {
$is_valid = $token_class::validate( $args );
}