コード例 #1
0
function mango_product_tabs()
{
    global $product, $post, $mango_settings;
    $ver = mango_single_product_version();
    if ($ver == "v_1") {
        add_action("woocommerce_after_single_product", "woocommerce_output_product_data_tabs", 44);
    } elseif ($ver == "v_2") {
        add_action("woocommerce_after_single_product_summary", "woocommerce_output_product_data_tabs", 10);
    }
}
コード例 #2
0
ファイル: tabs.php プロジェクト: nickkoskowski/Work-Depot
    exit;
}
global $post;
/**
 * Filter tabs and allow third parties to add their own
 *
 * Each tab is an array containing title, callback and priority.
 * @see woocommerce_default_product_tabs()
 */
$custom_tab_title1 = get_post_meta(get_the_id(), 'mango_tabs_custom_heading_one', true);
$custom_tab_content1 = get_post_meta(get_the_id(), 'mango_contact_tabs_content_one', true);
$custom_tab_title2 = get_post_meta(get_the_id(), 'mango_tabs_custom_heading_two', true);
$custom_tab_content2 = get_post_meta(get_the_id(), 'mango_contact_tabs_content_two', true);
$tabs = apply_filters('woocommerce_product_tabs', array());
if (!empty($tabs)) {
    $ver = mango_single_product_version();
    ?>
    <?php 
    if ($ver == "v_1") {
        ?>
	<div class="woocommerce-tabs row">
        <div class="col-md-12">
            <div role="tabpanel" class="product-details-tab">
                <ul class="tabs nav nav-tabs" role="tablist">
                    <?php 
        $current = "active";
        foreach ($tabs as $key => $tab) {
            if (class_exists('WC_Vendors')) {
                if ($tab['title'] == 'Additional Information') {
                    $tab['title'] = "Items Details";
                }