【问题标题】:Creating a download link to product image (all images)创建产品图片的下载链接(所有图片)
【发布时间】:2022-08-15 23:31:57
【问题描述】:

我想在我的 woocommerce 单品页面上添加一个下载按钮。单击此按钮后,我需要下载该产品的所有图像。我得到一个下载单个图像的代码。但我需要下载所有图像。

add_action(\'woocommerce_product_meta_end\',\'disclaimer\');

function disclaimer(){
    echo \'<br /><br /><a href=\"\'.wp_get_attachment_url( get_post_thumbnail_id() ).\'\" class=\"single_add_to_cart_button button     
    alt\">Download</a><p id=\"disclaimer-text\"><br /><br />*Color Disclaimer: 
    Due to the limitations of desktop scanners and the relative 
    inconsistencies of various display monitors, the colors you see on your 
    screen may not be a totally accurate reproduction of the actual product. 
    We strive to make our colors as accurate as possible, but screen images 
    are intended as a guide only and should not be regarded as absolutely 
    correct. If you would like to see a sample of any product shown on our 
    site, please call Customer Service at 6365 3383 or visit our contact 
    page.</p>\';
}

    标签: woocommerce


    【解决方案1】:

    您找到下载所有图像的解决方案了吗?

    【讨论】:

    猜你喜欢
    • 2014-02-25
    • 1970-01-01
    • 2011-09-11
    • 2021-01-17
    • 2022-12-11
    • 2018-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多