duanao6704 2018-09-12 09:36
浏览 81

更改wordpress / woocommerce插件中的导入设置

Hi I have the current code in the plugin, when I upload the excel through this plugin with this code it generates an general image to the product(which is defined on type of product). What I would like it to do is to make a unique image to each product, which is defined in excel as a url (the file is in medialibrary of wordpress)

$image_id_c_1 = wtf_set_featured_image( plugins_url( '/images/C/1.jpg', __FILE__  ) );

How could sould the code look like to do this, would it be something like this?

$image_id_c_1 = wtf_set_featured_image( _url( '/wp-content/uploads/2018/01/4030.jpg', __FILE__  ) ); 
  • 写回答

1条回答 默认 最新

  • drfrvbq736383 2018-09-12 09:37
    关注

    Try this:

    $image_id_c_1 = wtf_set_featured_image( _url( '<td>'.__('picture', 'wtf').'</td><td>'.$data[36].'</td>', __FILE__  ) ); 
    
    评论

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用