Código da videoaula Como adicionar uma nova aba na página de produto do WooCommerce - WordPress - https://www.youtube.com/watch?v=N9Z5HrTVowU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('woocommerce_product_tabs', 'custom_woocommerce_tab_video'); | |
function custom_woocommerce_tab_video($tabs){ | |
$tabs['tab_video'] = array( | |
'title' => 'Video', | |
'priority' => 99, | |
'callback' => 'custom_woocommerce_video' | |
); | |
return $tabs; | |
} | |
function custom_woocommerce_video(){ | |
global $post; | |
echo get_post_meta($post->ID, 'woocommerce_video', true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment