Plugin Directory

Changeset 701653


Ignore:
Timestamp:
04/22/2013 03:38:27 PM (13 years ago)
Author:
gesman
Message:

Fixing screenshots and improves upgradability

Location:
bitcoin-payments-for-woocommerce/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php

    r701239 r701653  
    1212Plugin URI: http://www.bitcoinway.com/
    1313Description: Bitcoin Payments for WooCommerce plugin allows you to accept payments in bitcoins for physical and digital products at your WooCommerce-powered online store.
    14 Version: 2.03
     14Version: 2.04
    1515Author: BitcoinWay
    1616Author URI: http://www.bitcoinway.com/
     
    4444function BWWC_activate()
    4545{
    46     global  $g_BWWC__config_defaults;
     46    global  $g_BWWC__config_defaults;
    4747
    48     $bwwc_default_options = $g_BWWC__config_defaults;
     48    $bwwc_default_options = $g_BWWC__config_defaults;
    4949
    50     // This will overwrite default options with already existing options but leave new options (in case of upgrading to new version) untouched.
    51     $bwwc_settings = BWWC__get_settings ();
    52     if (is_array ($bwwc_settings))
    53     {
    54         foreach ($bwwc_settings as $key=>$value)
    55         $bwwc_default_options[$key] = $value;
    56     }
     50    // This will overwrite default options with already existing options but leave new options (in case of upgrading to new version) untouched.
     51    $bwwc_settings = BWWC__get_settings ();
    5752
    58     update_option (BWWC_SETTINGS_NAME, $bwwc_default_options);
     53    foreach ($bwwc_settings as $key=>$value)
     54        $bwwc_default_options[$key] = $value;
    5955
    60     // Re-get new settings.
    61     $bwwc_settings = BWWC__get_settings ();
     56    update_option (BWWC_SETTINGS_NAME, $bwwc_default_options);
    6257
    63     // Create necessary database tables if not already exists...
    64     BWWC__create_database_tables ($bwwc_settings);
     58    // Re-get new settings.
     59    $bwwc_settings = BWWC__get_settings ();
    6560
    66     //----------------------------------
    67     // Setup cron jobs
     61    // Create necessary database tables if not already exists...
     62    BWWC__create_database_tables ($bwwc_settings);
    6863
    69     if ($bwwc_settings['enable_soft_cron_job'] && !wp_next_scheduled('BWWC_cron_action'))
    70     {
    71         $cron_job_schedule_name = strpos($_SERVER['HTTP_HOST'], 'ttt.com')===FALSE ? $bwwc_settings['soft_cron_job_schedule_name'] : 'seconds_30';
    72         wp_schedule_event(time(), $cron_job_schedule_name, 'BWWC_cron_action');
    73     }
    74     //----------------------------------
     64    //----------------------------------
     65    // Setup cron jobs
     66
     67    if ($bwwc_settings['enable_soft_cron_job'] && !wp_next_scheduled('BWWC_cron_action'))
     68    {
     69        $cron_job_schedule_name = strpos($_SERVER['HTTP_HOST'], 'ttt.com')===FALSE ? $bwwc_settings['soft_cron_job_schedule_name'] : 'seconds_30';
     70        wp_schedule_event(time(), $cron_job_schedule_name, 'BWWC_cron_action');
     71    }
     72    //----------------------------------
    7573
    7674}
  • bitcoin-payments-for-woocommerce/trunk/bwwc-admin.php

    r701236 r701653  
    135135function BWWC__get_settings ($key=false)
    136136{
    137    global   $g_BWWC__plugin_directory_url;
    138    global   $g_BWWC__config_defaults;
    139 
    140    $bwwc_settings = get_option (BWWC_SETTINGS_NAME);
    141 
    142 
    143 
    144    if (!$key)
    145       return ($bwwc_settings);
    146    else
    147       return (@$bwwc_settings[$key]);
     137  global   $g_BWWC__plugin_directory_url;
     138  global   $g_BWWC__config_defaults;
     139
     140  $bwwc_settings = get_option (BWWC_SETTINGS_NAME);
     141  if (!is_array($bwwc_settings))
     142    $bwwc_settings = array();
     143
     144
     145
     146  if ($key)
     147    return (@$bwwc_settings[$key]);
     148  else
     149    return ($bwwc_settings);
    148150}
    149151//===========================================================================
  • bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php

    r701239 r701653  
    99if (!defined('BWWC_PLUGIN_NAME'))
    1010  {
    11   define('BWWC_VERSION',           '2.03');
     11  define('BWWC_VERSION',           '2.04');
    1212
    1313  //-----------------------------------------------
  • bitcoin-payments-for-woocommerce/trunk/readme.txt

    r701239 r701653  
    5050
    5151
     52== Supporters ==
     53
     54* Yifu Guo: http://bitsyn.com/
     55* Chris Savery: https://github.com/bkkcoins/misc
     56* lowcostego: http://wordpress.org/support/profile/lowcostego
     57* WebDesZ: http://wordpress.org/support/profile/webdesz
     58* ninjastik: http://wordpress.org/support/profile/ninjastik
     59
     60
    5261== Changelog ==
     62
     63= 2.04 =
     64* Improved upgradeability from older versions.
    5365
    5466= 2.02 =
Note: See TracChangeset for help on using the changeset viewer.