Hi,
The callback is included in the block builder (cf screenshot).
If add a other product (in the good term) i dont see it in the selector
function nxt_get_accessories_list() {
$posts = get_posts([
"post_type" => "product",
"tax_query" => [
[
"taxonomy" => "product_cat",
"field" => "slug",
"terms" => "accessoires"
]
]
]);
$posts = array_map(
function($post) {
return [
$post->ID,
$post->post_title
];
},
$posts
);
return array_column(
$posts,
1,
0
);
}