Skip to content

Instantly share code, notes, and snippets.

@bhavik-kiri
Last active November 6, 2017 05:21
Show Gist options
  • Save bhavik-kiri/91023c18fb24eb1c7eb8be1a456f3c0b to your computer and use it in GitHub Desktop.
Save bhavik-kiri/91023c18fb24eb1c7eb8be1a456f3c0b to your computer and use it in GitHub Desktop.
<?php
add_filter( 'woocommerce_product_data_tabs', 'gift_card_tab' );
function gift_card_tab( $tabs) {
// Key should be exactly the same as in the class product_type
$tabs['gift_card'] = array(
'label' => __( 'Gift Card', 'wcpt' ),
'target' => 'gift_card_options',
'class' => ('show_if_gift_card'),
);
return $tabs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment