DROP TABLE IF EXISTS `ok_wishlists`;
CREATE TABLE `ok_wishlists` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (product_id) REFERENCES `ok_products`(id),
FOREIGN KEY (user_id) REFERENCES `ok_users`(id),
INDEX (product_id),
INDEX (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
WP_Post_Type Object
(
[name] => product
[label] => Товары
[labels] => stdClass Object
(
[name] => Товары
[singular_name] => Товар
[add_new] => Добавить
[add_new_item] => Добавить товар
[edit_item] => Изменить товар
[new_item] => Новый товар
[view_item] => Просмотреть товар
[view_items] => Просмотр товара
[search_items] => Поиск по товарам
[not_found] => Товаров не обнаружено
[not_found_in_trash] => В удалённых нет товаров
[parent_item_colon] =>
[all_items] => Все товары
[archives] => Все товары
[attributes] => Свойства записи
[insert_into_item] => Вставьте в товар
[uploaded_to_this_item] => Загружено в товар
[featured_image] => Изображение товара
[set_featured_image] => Задать изображение товара
[remove_featured_image] => Удалить изображение товара
[use_featured_image] => Использовать в качестве изображения товара
[filter_items_list] => Фильтровать товары
[items_list_navigation] => Навигация по товарам
[items_list] => Список товаров
[item_published] => Запись опубликована.
[item_published_privately] => Запись опубликована как личная.
[item_reverted_to_draft] => Запись возвращена в черновики.
[item_scheduled] => Запись запланирована к публикации.
[item_updated] => Запись обновлена.
[menu_name] => Товары
[edit] => Изменить
[parent] => Родительский товар
[name_admin_bar] => Товар
)
[description] => Здесь вы можете добавлять новые товары в ваш магазин.
[public] => 1
[hierarchical] =>
[exclude_from_search] =>
[publicly_queryable] => 1
[show_ui] => 1
[show_in_menu] => 1
[show_in_nav_menus] => 1
[show_in_admin_bar] => 1
[menu_position] =>
[menu_icon] => dashicons-products
[capability_type] => product
[map_meta_cap] => 1
[register_meta_box_cb] =>
[taxonomies] => Array
(
)
[has_archive] => shop
[query_var] => product
[can_export] => 1
[delete_with_user] =>
[template] => Array
(
)
[template_lock] =>
[_builtin] =>
[_edit_link] => post.php?post=%d
[cap] => stdClass Object
(
[edit_post] => edit_product
[read_post] => read_product
[delete_post] => delete_product
[edit_posts] => edit_products
[edit_others_posts] => edit_others_products
[delete_posts] => delete_products
[publish_posts] => publish_products
[read_private_posts] => read_private_products
[read] => read
[delete_private_posts] => delete_private_products
[delete_published_posts] => delete_published_products
[delete_others_posts] => delete_others_products
[edit_private_posts] => edit_private_products
[edit_published_posts] => edit_published_products
[create_posts] => edit_products
)
[rewrite] => Array
(
[slug] => product
[with_front] =>
[feeds] => 1
[pages] => 1
[ep_mask] => 1
)
[show_in_rest] => 1
[rest_base] =>
[rest_controller_class] =>
[rest_controller] =>
)
//добавляем поле для категорий
add_action( 'woocommerce_after_subcategory_title', "ACF_product_content", 10 );
function ACF_product_content(){
echo '<h2> ACF Content </h2>';
$queried_object = get_queried_object();
$cat_field = get_field( 'description_category', $queried_object );
echo $cat_field;
}
1. Department - как taxonomy
2. Doctors - post_type