WooCommerceには、woocommerce製品ページの下部に1つの追加タブを追加する方法に関するドキュメントがあります。コードはfunctions.phpに挿入され、編集可能です。woocommerceの製品ページの下部タブの追加
私はちょうどそれらがお互いに衝突することなく、functions.phpにもっと多くのタブを追加する方法が不思議です。 2番目と3番目の余分なタブに追加する必要があるコードは何ですか?ここで
は、最初のタブのためのwoocommerceからのコードは次のとおりです。
add_filter('woocommerce_product_tabs', 'woo_new_product_tab');
function woo_new_product_tab($tabs) {
\t
\t // Adds the new tab
\t
\t $tabs['test_tab'] = array(
\t \t 'title' \t => __('New Product Tab', 'woocommerce'),
\t \t 'priority' \t => 50,
\t \t 'callback' \t => 'woo_new_product_tab_content'
\t);
\t return $tabs;
}
function woo_new_product_tab_content() {
\t // The new tab content
\t echo '<h2>New Product Tab</h2>';
\t echo '<p>Here\'s your new product tab.</p>';
\t
}