improved structured data - add `methhod_exists()` statement into

`generate_output_structured_data()` method
This commit is contained in:
opportus 2016-08-17 21:14:59 +02:00
parent 6f3974d0e2
commit 88929a9d35
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class WC_Structured_Data {
$generate = 'generate_' . $type . '_data';
if ( $this->$generate( $object, $param_1, $param_2, $param_3 ) ) {
if ( method_exists( $this, $generate ) && $this->$generate( $object, $param_1, $param_2, $param_3 ) ) {
return $this->output_structured_data( $type );
} else {
return false;