douyingmou1389 2019-05-07 08:33
浏览 67

如何在子主题中添加自定义插件文件?

I have do some customize in /wp-content/plugins/woocommerce/includes/class-wc-download-handler.php, and i want to add it in my child theme . but after i add in to mytheme-child/woocommerce/includes/class-wc-download-handler.php there is nothing changing. May i know how to add the files?

    // Track the download in logs and change remaining/counts.
    $current_user_id = get_current_user_id();
    $ip_address      = WC_Geolocation::get_ip_address();
    if ( ! $download_range['is_range_request'] ) {
        $download->track_download( $current_user_id > 0 ? $current_user_id : null, ! empty( $ip_address ) ? $ip_address : null );
    }

    if (isset($_SERVER["HTTP_REFERER"])) {
        header("Location: " . $_SERVER["HTTP_REFERER"]);
    }

    //self::download( $file_path, $download->get_product_id() );

How to i add this to child theme?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥35 平滑拟合曲线该如何生成
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 自己瞎改改,结果现在又运行不了了
    • ¥15 链式存储应该如何解决
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站