Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce: добавить вкладку со ссылкой на страницу
* Добавляем вкладку «Оплата и доставка» в карточке товара (фронтенд)
function add_tabs($tabs){
$tabs[ 'payment_delivery' ] = array(
'title' => 'Оплата и доставка',
'priority' => 40,
'callback' => 'payment_delivery_description_tab'
return $tabs;
function payment_delivery_description_tab() {
$description = get_post_field( 'post_content', 27, 'display' ); // Подтягиваем текст со страницы «Оплата и доставка» (ID =27)
echo $description;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment