improved structured data - add `methhod_exists()` statement into
`generate_output_structured_data()` method
This commit is contained in:
parent
6f3974d0e2
commit
88929a9d35
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue