__( 'Woocommerce Sidebar', 'canvi' ),
'id' => 'woocommerce_sidebar',
'description' => __( 'Widgets in this area will be shown on Woocommerce pages.', 'canvi' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'canvi_theme_woocommerce_widgets_init' );
// add cart menu item
add_filter( 'canvi_add_menu_item', function () {
return Canvi_Component_Nav::cart_menu_item();
} );
if ( ! function_exists( 'canvi_single_product_customize' ) ) {
function canvi_single_product_customize() {
if ( is_product() || is_product_category() || is_shop() ) {
add_filter( 'rcoksite_header_page_type', function () {
return '0';
} );
add_filter( 'canvi_meta_info', function () {
return array();
} );
add_filter( 'comments_open', function () {
return FALSE;
} );
add_filter( 'canvi_get_sidebar_type', function () {
return 'woocommerce';
} );
}
}
}
add_action( 'template_redirect', 'canvi_single_product_customize', 5 );
}