Skip to content

Commit

Permalink
zips content is not exists when updating plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed Jun 29, 2019
1 parent 7f3ae06 commit 1cd6a03
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// who wrote this plugin?
'plugin_developer' => 'Kleeja Team',
// this plugin version
'plugin_version' => '1.2.1',
'plugin_version' => '1.2.2',
// explain what is this plugin, why should i use it?
'plugin_description' => [
'en' => 'Selling Files and Premium Groups',
Expand Down Expand Up @@ -235,37 +235,6 @@


add_config_r($options);


if (! file_exists(dirname(__FILE__) . '/vendor/autoload.php'))
{
// extract paypal sdk
if (file_exists(dirname(__FILE__) . '/paypal_sdk.zip'))
{
$paypalZip = new ZipArchive;

if ($paypalZip->open(dirname(__FILE__) . '/paypal_sdk.zip'))
{
$paypalZip->extractTo(dirname(__FILE__));
$paypalZip->close();
}
}
}

if (! file_exists(dirname(__FILE__) . '/stripe-sdk/vendor/autoload.php'))
{
// extract stripe sdk
if (file_exists(dirname(__FILE__) . '/stripe-sdk.zip'))
{
$stripeZip = new ZipArchive;

if ($stripeZip->open(dirname(__FILE__) . '/stripe-sdk.zip'))
{
$stripeZip->extractTo(dirname(__FILE__));
$stripeZip->close();
}
}
}
};


Expand Down Expand Up @@ -1285,6 +1254,37 @@
$langFiles = require_once $langFiles;
$olang = array_merge($olang, $langFiles);
}

if (! file_exists(dirname(__FILE__) . '/vendor/autoload.php'))
{
// extract paypal sdk
if (file_exists(dirname(__FILE__) . '/paypal_sdk.zip'))
{
$paypalZip = new ZipArchive;

if ($paypalZip->open(dirname(__FILE__) . '/paypal_sdk.zip'))
{
$paypalZip->extractTo(dirname(__FILE__));
$paypalZip->close();
}
}
}

if (! file_exists(dirname(__FILE__) . '/stripe-sdk/vendor/autoload.php'))
{
// extract stripe sdk
if (file_exists(dirname(__FILE__) . '/stripe-sdk.zip'))
{
$stripeZip = new ZipArchive;

if ($stripeZip->open(dirname(__FILE__) . '/stripe-sdk.zip'))
{
$stripeZip->extractTo(dirname(__FILE__));
$stripeZip->close();
}
}
}

return compact('olang');
}

Expand Down

0 comments on commit 1cd6a03

Please sign in to comment.