updated plugin Easy Digital Downloads version 3.1.2

This commit is contained in:
2023-06-28 12:45:44 +00:00
committed by Gitium
parent 44df590080
commit f710fa7de2
120 changed files with 5556 additions and 3347 deletions

View File

@ -259,11 +259,12 @@ class EDD_Batch_Downloads_Import extends EDD_Batch_Import {
*/
public function get_percentage_complete() {
if( $this->total > 0 ) {
$percentage = 0;
if ( $this->total > 0 ) {
$percentage = ( $this->step * $this->per_step / $this->total ) * 100;
}
if( $percentage > 100 ) {
if ( $percentage > 100 ) {
$percentage = 100;
}
@ -368,7 +369,7 @@ class EDD_Batch_Downloads_Import extends EDD_Batch_Import {
private function set_image( $download_id = 0, $image = '', $post_author = 0 ) {
$is_url = false !== filter_var( $image, FILTER_VALIDATE_URL );
$is_local = $is_url && false !== strpos( site_url(), $image );
$is_local = $is_url && false !== strpos( $image, site_url() );
$ext = edd_get_file_extension( $image );
if( $is_url && $is_local ) {