woocommerce_file_download_path

woocommerce_file_download_path

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_file_download_path') is found 3 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 647
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
                }
                $download = new WC_Product_Download();
                $download->set_id( $key );
                $download->set_name( $value['name'] ? $value['name'] : wc_get_filename_from_url( $value['file'] ) );
                $download->set_file( apply_filters( 'woocommerce_file_download_path', $value['file'], $product, $key ) );
                $downloads[] = $download;
            }
            $product->set_downloads( $downloads );
        }
    }
  • /includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php line 972
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
            $download = new WC_Product_Download();
            $download->set_id( ! empty( $file['id'] ) ? $file['id'] : wp_generate_uuid4() );
            $download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
            $download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
            $files[]  = $download;
        }
        $product->set_downloads( $files );
     
        return $product;
    }
  • /includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php line 1450
    1447
    1448
    1449
    1450
    1451
    1452
    1453
    1454
    1455
    1456
            $download = new WC_Product_Download();
            $download->set_id( ! empty( $file['id'] ) ? $file['id'] : wp_generate_uuid4() );
            $download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
            $download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
            $files[] = $download;
        }
        $product->set_downloads( $files );
     
        return $product;
    }