PluginProbe
MyRewards / trunk
MyRewards vtrunk
5.7.8 5.7.7 5.7.6 trunk 1.2.2 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.1 2.2.0 2.3.0 2.4.0 2.4.1 2.5.0 2.6.4 2.6.6 3.0.0.0 3.1.0 3.1.2 3.1.2.1 3.10.4 3.10.9 All 165 releases
woorewards / include / pointsflow / methods / mycred.php

mycred.php in MyRewards trunk, at include/pointsflow/methods/mycred.php

41 lines 942 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace LWS\WOOREWARDS\PointsFlow\Methods;
3
4 // don't call the file directly
5 if( !defined( 'ABSPATH' ) ) exit();
6
7 /** Get the total points for users.
8 * @warning Sumo support float values,
9 * that will be rounded (floor) at import in MyRewards (points are integer). */
10 class MyCred extends \LWS\WOOREWARDS\PointsFlow\Methods\MetaKey
11 {
12 /** @return (array) the json that will be send,
13 * An array with each entries as {email, points} */
14 public function export($value, $arg)
15 {
16 return parent::export($arg, false);
17 }
18
19 public function getTitle()
20 {
21 return __("myCRED", 'woorewards-lite');
22 }
23
24 /** allow free user input */
25 public function supportFreeArgs()
26 {
27 return false;
28 }
29
30 public function getArgs()
31 {
32 $optionId = \apply_filters('mycred_get_option_id', 'mycred_types');
33
34 $pointTypes = \get_option($optionId, array());
35 if( $pointTypes && \is_array($pointTypes) )
36 return $pointTypes;
37 else
38 return array();
39 }
40 }
41