-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from WordPoints/develop
1.2.1
- Loading branch information
Showing
35 changed files
with
337 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# WooCommerce [![Build Status](https://travis-ci.org/WordPoints/woocommerce.svg?branch=develop)](https://travis-ci.org/WordPoints/woocommerce) [![codecov](https://codecov.io/gh/WordPoints/woocommerce/branch/master/graph/badge.svg)](https://codecov.io/gh/WordPoints/woocommerce) [![HackerOne Bug Bounty Program](https://img.shields.io/badge/security-HackerOne-blue.svg)](https://hackerone.com/wordpoints) | ||
|
||
Hello! This is where we develop the premium WooCommerce integration module that you can [purchase on WordPoints.org](https://wordpoints.org/modules/woocommerce/). The source code of the module is made available here in good faith, to make it easier for developers to integrate with it, contribute bugfixes and security patches, and follow the development of new features. You can also feel free to use this source code to try the module out before you buy it. However, if you decide to use the module on a production site, we ask that you [purchase a license for it](https://wordpoints.org/modules/woocommerce/), so that we can continue to provide updates and support for WordPoints and all of its great modules. Thank you! | ||
Hello! This is where we develop the premium WooCommerce integration extension that you can [purchase on WordPoints.org](https://wordpoints.org/extensions/woocommerce/). The source code of the extension is made available here in good faith, to make it easier for developers to integrate with it, contribute bugfixes and security patches, and follow the development of new features. You can also feel free to use this source code to try the extension out before you buy it. However, if you decide to use the extension on a production site, we ask that you [purchase a license for it](https://wordpoints.org/extensions/woocommerce/), so that we can continue to provide updates and support for WordPoints and all of its great extensions. Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/** | ||
* Installable class. | ||
* | ||
* @package WordPoints_WooCommerce | ||
* @since 1.2.1 | ||
*/ | ||
|
||
/** | ||
* Installable object for the extension. | ||
* | ||
* @since 1.2.1 | ||
*/ | ||
class WordPoints_WooCommerce_Installable extends WordPoints_Installable_Extension { | ||
|
||
/** | ||
* @since 1.2.1 | ||
*/ | ||
public function get_update_routine_factories() { | ||
|
||
$factories = parent::get_update_routine_factories(); | ||
|
||
// v1.2.0. | ||
$factories[] = new WordPoints_Updater_Factory( | ||
'1.2.0' | ||
, array( | ||
'local' => array( 'WordPoints_WooCommerce_Updater_1_2_0_Gateway' ), | ||
) | ||
); | ||
|
||
return $factories; | ||
} | ||
|
||
/** | ||
* @since 1.2.1 | ||
*/ | ||
protected function get_uninstall_routine_factories() { | ||
|
||
$factories = parent::get_uninstall_routine_factories(); | ||
|
||
$factories[] = new WordPoints_Uninstaller_Factory_Options( | ||
array( 'woocommerce_wordpoints_points_settings' ) | ||
); | ||
|
||
return $factories; | ||
} | ||
} | ||
|
||
// EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* Gateway 1.2.0 updater class. | ||
* | ||
* @package WordPoints_WooCommerce | ||
* @since 1.2.1 | ||
*/ | ||
|
||
/** | ||
* Updates the gateway settings for 1.2.0. | ||
* | ||
* @since 1.2.1 | ||
*/ | ||
class WordPoints_WooCommerce_Updater_1_2_0_Gateway implements WordPoints_RoutineI { | ||
|
||
/** | ||
* @since 1.2.1 | ||
*/ | ||
public function run() { | ||
|
||
$gateway = new WordPoints_WooCommerce_Gateway_Points(); | ||
|
||
$settings = $gateway->settings; | ||
|
||
if ( ! isset( $settings['points_type'], $settings['conversion_rate'] ) ) { | ||
return; | ||
} | ||
|
||
$settings[ "conversion_rate-{$settings['points_type']}" ] = $settings['conversion_rate']; | ||
|
||
unset( $settings['points_type'], $settings['conversion_rate'] ); | ||
|
||
update_option( $gateway->get_option_key(), $settings ); | ||
} | ||
} | ||
|
||
// EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.