Woocommerce:自定义字段/属性等于单个产品标题

问题描述

我有一个自定义字段代码段,它不必显示在单个产品页面上,但我需要 titolo_comparatori 等于单个产品标题。现在该字段显示的文本不正确,因此我必须在每个产品中将其擦除并使其正常工作。 我还在学习中,有人可以帮助我吗? 非常感谢!

<?PHP 

add_filter( 'rwmb_Meta_Boxes','city_register_Meta_Boxes' );

function city_register_Meta_Boxes( $Meta_Boxes ) {
    $prefix = 'prefix-';

    $Meta_Boxes[] = [
        'title'      => esc_html__( 'Attributi avanzanti','city-attributes' ),'id'         => 'attributi-avanzati','post_types' => ['product'],'context'    => 'normal','priority'   => 'high','fields'     => [
        
            [
                'type' => 'text','id'   => $prefix . 'titolo_comparatori','name' => esc_html__( 'titolo_comparatori',],];

    return $Meta_Boxes;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)