Script Php: differenze tra le versioni

Da Webmobili Wiki.
Creata pagina con "== Woocommerce == === Tassonomie standard WooCommerce === * '''Categorie prodotti''' <syntaxhighlight lang="php"> $categories = wp_get_post_terms($product->get_id(), 'product_cat'); </syntaxhighlight> * '''Tagprodotti''' <syntaxhighlight lang="php"> $tags = wp_get_post_terms($product->get_id(), 'product_tag'); </syntaxhighlight>"
(Nessuna differenza)

Versione delle 14:03, 5 ago 2025

Woocommerce

Tassonomie standard WooCommerce

  • Categorie prodotti
$categories = wp_get_post_terms($product->get_id(), 'product_cat');
  • Tagprodotti
$tags = wp_get_post_terms($product->get_id(), 'product_tag');