小编Pup*_*pik的帖子

如何在变体中获取属性名称而不是slug?

我需要从woocommerce产品变异获得属性.

$terms = get_post_meta($value['variation_id'], 'attribute_pa_color', true);
Run Code Online (Sandbox Code Playgroud)

这段代码给了我一个属性slug而不是name.我怎样才能获得属性名称?

非常感谢你提前!

php variables attributes slug woocommerce

15
推荐指数
1
解决办法
2万
查看次数

标签 统计

attributes ×1

php ×1

slug ×1

variables ×1

woocommerce ×1