Is there a way to override a function inside a class without touching the class coding?
We have the class, let's say it's located in foo.php:
class WPSEO_Frontend {
public function head() {
echo '<!-- / ', $this->head_product_name(), ". -->\n\n";
return;
}
}
So without modifying this class above, is there a way to remove this echo
from the outside of the class, like (I know the below example isn't going to work):
bar.php
class WPSEO_Frontend overrides head {
echo '';
return;
}