Plugin Directory

Changeset 2863648


Ignore:
Timestamp:
02/11/2023 01:32:30 PM (3 years ago)
Author:
proloybhaduri
Message:

Certificate file path correction

Location:
payment-gateway-for-swish-givewp
Files:
1405 added
3 edited

Legend:

Unmodified
Added
Removed
  • payment-gateway-for-swish-givewp/trunk/readme.txt

    r2862726 r2863648  
    66Requires at least: 5.2
    77Tested up to: 6.1
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99Requires PHP: 8.1
    1010License: GPLv2 or later
     
    4444== Changelog ==
    4545
     46= 1.0.1 =
     47
     48* Fix: Certificate file path correction
     49
    4650= 1.0.0 =
    4751
  • payment-gateway-for-swish-givewp/trunk/src/Swish.php

    r2862708 r2863648  
    9797            // ];
    9898            return [
    99                 GIVESWISH_PLUGIN_DIR . 'certs/SwishCert.p12',
     99                //GIVESWISH_PLUGIN_DIR . 'certs/SwishCert.p12',
     100                Utility::media_url_to_path(Utility::get_certificate_file()),
    100101                Utility::get_certificate_password(),
    101102            ];
  • payment-gateway-for-swish-givewp/trunk/src/Utility.php

    r2862708 r2863648  
    5555        return $number;
    5656    }
     57
     58    public static function media_url_to_path($url)
     59    {
     60        $upload_dir = \wp_upload_dir();
     61        $base_url = $upload_dir['baseurl'];
     62        $file_path = str_replace($base_url, $upload_dir['basedir'], $url);
     63        return $file_path;
     64    }
    5765}
Note: See TracChangeset for help on using the changeset viewer.