Cannot redeclare class YIKES_Custom_Product_Tabs_Display_Ext

  • Member
    ravi9j
    July 8, 2018 at 10:35 am #5375

    I installed the plugin “Custom Product Tab” to add new tab in the tour list. and when I was adding the following code to the functions.php it gave me the error: Your PHP code changes were rolled back due to an error on line 22 of file wp-content/themes/travelwp/functions.php. Please fix and try saving again.

    Cannot redeclare class YIKES_Custom_Product_Tabs_Display_Ext

    Here is the code which i used from documentation:
    if ( class_exists( ‘YIKES_Custom_Product_Tabs_Display’ ) ) {
    class YIKES_Custom_Product_Tabs_Display_Ext extends YIKES_Custom_Product_Tabs_Display {
    public function init() {
    // Add our custom product tabs section to the tour page
    add_filter( ‘tour_booking_default_product_tabs’, array( $this, ‘add_custom_product_tabs’ ) );
    }
    }
    new YIKES_Custom_Product_Tabs_Display_Ext();
    }

    Please advice.

    Regards,

    Ravi

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.