I'm struggling to remove this function line without getting a syntax error :
function product_meta_box_content( $post ) {
from the following code :
<?php
if ( ! class_exists( 'Tax_Meta_Boxes' ) ) :
class Tax_Meta_Boxes {
public function __construct() {
add_action( 'save_post', array( $this, 'save_tax_meta_data' ) );
}
// I need to remove this function
function product_meta_box_content( $post ) {
?>
<?php
}
public function save_tax_meta_data( $post_id ) {
if ( ! isset( $_POST['post_type'] ) or $_POST['post_type'] !== 'product' ) {
return;
}
}
}
endif;
I've tried commenting the line out, removing the line, adding, removing php tags, but every single time it results in a syntax error.
I'm a little confused in the opening and closing php tags and inserting the curly brackets.
Would someone be able to point me to the right direction and point out how to correctly remove the function line ?