Plugin Directory

Changeset 1453190


Ignore:
Timestamp:
07/12/2016 05:37:05 AM (10 years ago)
Author:
mbj-webdevelopment
Message:

Tested Twilio SMS For Woo working very well

Location:
twilio-sms-for-woo/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • twilio-sms-for-woo/trunk/README.txt

    r1393730 r1453190  
    5353
    5454== Changelog ==
     55= 1.0.6 =
     56*   Tested Twilio SMS For Woo working very well.
    5557= 1.0.5 =
    56 * Tested up to: 4.5
     58*   Tested up to: 4.5
    5759= 1.0.4 =
    58 * uInternal server error during checkout if I enter two mobile numbers.
     60*   uInternal server error during checkout if I enter two mobile numbers.
    5961= 1.0.3 =
    60 * update version.
     62*   update version.
    6163= 1.0.2 =
    62 * Add hook
     64*   Add hook
    6365= 1.0.1 =
    64 code optimized
     66 code optimized
    6567= 1.0.0 =
    6668*   Release Date - 20 Aug, 2015
  • twilio-sms-for-woo/trunk/admin/class-twilio-sms-for-woo-admin.php

    r1337041 r1453190  
    5050     */
    5151    public function enqueue_scripts() {
    52         wp_enqueue_script($this->plugin_name.'bn', plugin_dir_url(__FILE__) . 'js/twilio-sms-for-woo-bn.js', array('jquery'), $this->version, false);
     52        wp_enqueue_script($this->plugin_name . 'bn', plugin_dir_url(__FILE__) . 'js/twilio-sms-for-woo-bn.js', array('jquery'), $this->version, false);
    5353        wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/twilio-sms-for-woo-admin.js', array('jquery'), $this->version, false);
    5454        if (wp_script_is($this->plugin_name)) {
     
    6464        return $paypal_args;
    6565    }
     66
    6667    public function twilio_sms_for_woo_paypal_digital_goods_nvp_args($paypal_args) {
    6768        $paypal_args['BUTTONSOURCE'] = 'mbjtechnolabs_SP';
    6869        return $paypal_args;
    6970    }
     71
    7072    public function twilio_sms_for_woo_gateway_paypal_pro_payflow_request($paypal_args) {
    7173        $paypal_args['BUTTONSOURCE'] = 'mbjtechnolabs_SP';
    7274        return $paypal_args;
    7375    }
     76
    7477    public function twilio_sms_for_woo_gateway_paypal_pro_request($paypal_args) {
    7578        $paypal_args['BUTTONSOURCE'] = 'mbjtechnolabs_SP';
     
    130133    public static function send_customer_notification_sms_twilio_sms_for_woo($phone, $message) {
    131134        $log = new Twilio_SMS_For_Woo_Logger();
    132        
     135
    133136        if (file_exists(TWILLIO_PLUGIN_DIR_PATH . '/admin/partials/lib/Twilio.php')) {
    134             require_once TWILLIO_PLUGIN_DIR_PATH . '/admin/partials/lib/Twilio.php';           
    135         }     
     137            require_once TWILLIO_PLUGIN_DIR_PATH . '/admin/partials/lib/Twilio.php';
     138        }
    136139        $AccountSid = get_option("twilio_sms_woo_account_sid");
    137140        $AuthToken = get_option("twilio_sms_woo_auth_token");
  • twilio-sms-for-woo/trunk/admin/partials/class-twilio-sms-for-woo-setting.php

    r1337041 r1453190  
    2121    }
    2222
    23      public static function twilio_sms_send_test_sms() {
     23    public static function twilio_sms_send_test_sms() {
    2424        check_ajax_referer('twilio_sms_woo_test_sms', 'security');
    2525        $log = new Twilio_SMS_For_Woo_Logger();
     
    2929        $from_number = get_option("twilio_sms_woo_from_number");
    3030        $response = '';
    31        
     31
    3232        $test_mobile_number = $_POST['twilio_sms_woo_test_phone'];
    33         $Test_Mobile_Array = '';               
    34         $Test_Mobile_Array = explode(',', $test_mobile_number);         
    35      
     33        $Test_Mobile_Array = '';
     34        $Test_Mobile_Array = explode(',', $test_mobile_number);
     35
    3636        $test_message = sanitize_text_field($_POST['twilio_sms_woo_test_message']);
    3737        $http = new Services_Twilio_TinyHttp(
     
    4141            ))
    4242        );
    43        
    44         if(is_array($Test_Mobile_Array) && count($Test_Mobile_Array) > 0){
    45            
     43
     44        if (is_array($Test_Mobile_Array) && count($Test_Mobile_Array) > 0) {
     45
    4646            foreach ($Test_Mobile_Array as $key => $value) {
    4747                try {
     
    6161                        $log->add('Twilio SMS', 'TEST SMS Error message ' . $e->getMessage());
    6262                    }
    63                 }               
    64             }           
     63                }
     64            }
    6565        }
    6666        echo json_encode($response);
  • twilio-sms-for-woo/trunk/includes/class-twilio-sms-for-woo-activator.php

    r1232891 r1453190  
    2020    }
    2121
    22    
    2322    private function create_files() {
    2423        $files = array(
  • twilio-sms-for-woo/trunk/includes/class-twilio-sms-for-woo-deactivator.php

    r1232891 r1453190  
    1313class Twilio_Sms_For_Woo_Deactivator {
    1414
    15     /**
    16     * @since    1.0.0
    17     */
    18     public static function deactivate() {
    19 
    20     }
     15    /**
     16    * @since    1.0.0
     17    */
     18    public static function deactivate() {
     19       
     20    }
    2121
    2222}
  • twilio-sms-for-woo/trunk/includes/class-twilio-sms-for-woo-i18n.php

    r1232891 r1453190  
    1414class Twilio_Sms_For_Woo_i18n {
    1515
    16     /**
    17     * The domain specified for this plugin.
    18     *
    19     * @since    1.0.0
    20     * @access   private
    21     * @var      string    $domain    The domain identifier for this plugin.
    22     */
    23     private $domain;
     16    /**
     17    * The domain specified for this plugin.
     18    *
     19    * @since    1.0.0
     20    * @access   private
     21    * @var      string    $domain    The domain identifier for this plugin.
     22    */
     23    private $domain;
    2424
    25     /**
    26     * Load the plugin text domain for translation.
    27     *
    28     * @since    1.0.0
    29     */
    30     public function load_plugin_textdomain() {
     25    /**
     26    * Load the plugin text domain for translation.
     27    *
     28    * @since    1.0.0
     29    */
     30    public function load_plugin_textdomain() {
    3131
    32         load_plugin_textdomain(
    33             $this->domain,
    34             false,
    35             dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
    36         );
     32        load_plugin_textdomain(
     33                $this->domain, false, dirname(dirname(plugin_basename(__FILE__))) . '/languages/'
     34        );
     35    }
    3736
    38     }
    39 
    40     /**
    41      * Set the domain equal to that of the specified domain.
    42      *
    43      * @since    1.0.0
    44      * @param    string    $domain    The domain that represents the locale of this plugin.
    45      */
    46     public function set_domain( $domain ) {
    47         $this->domain = $domain;
    48     }
     37    /**
     38     * Set the domain equal to that of the specified domain.
     39     *
     40     * @since    1.0.0
     41     * @param    string    $domain    The domain that represents the locale of this plugin.
     42     */
     43    public function set_domain($domain) {
     44        $this->domain = $domain;
     45    }
    4946
    5047}
  • twilio-sms-for-woo/trunk/includes/class-twilio-sms-for-woo-loader.php

    r1232891 r1453190  
    1414class Twilio_Sms_For_Woo_Loader {
    1515
    16     /**
    17     * The array of actions registered with WordPress.
    18     *
    19     * @since    1.0.0
    20     * @access   protected
    21     * @var      array    $actions    The actions registered with WordPress to fire when the plugin loads.
    22     */
    23     protected $actions;
     16    /**
     17    * The array of actions registered with WordPress.
     18    *
     19    * @since    1.0.0
     20    * @access   protected
     21    * @var      array    $actions    The actions registered with WordPress to fire when the plugin loads.
     22    */
     23    protected $actions;
    2424
    25     /**
    26     * The array of filters registered with WordPress.
    27     *
    28     * @since    1.0.0
    29     * @access   protected
    30     * @var      array    $filters    The filters registered with WordPress to fire when the plugin loads.
    31     */
    32     protected $filters;
     25    /**
     26    * The array of filters registered with WordPress.
     27    *
     28    * @since    1.0.0
     29    * @access   protected
     30    * @var      array    $filters    The filters registered with WordPress to fire when the plugin loads.
     31    */
     32    protected $filters;
    3333
    34     /**
    35     * Initialize the collections used to maintain the actions and filters.
    36     *
    37     * @since    1.0.0
    38     */
    39     public function __construct() {
     34    /**
     35    * Initialize the collections used to maintain the actions and filters.
     36    *
     37    * @since    1.0.0
     38    */
     39    public function __construct() {
    4040
    41         $this->actions = array();
    42         $this->filters = array();
     41        $this->actions = array();
     42        $this->filters = array();
     43    }
    4344
    44     }
     45    /**
     46     * Add a new action to the collection to be registered with WordPress.
     47     *
     48     * @since    1.0.0
     49     * @param      string               $hook             The name of the WordPress action that is being registered.
     50     * @param      object               $component        A reference to the instance of the object on which the action is defined.
     51     * @param      string               $callback         The name of the function definition on the $component.
     52     * @param      int      Optional    $priority         The priority at which the function should be fired.
     53     * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
     54     */
     55    public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
     56        $this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
     57    }
    4558
    46     /**
    47      * Add a new action to the collection to be registered with WordPress.
    48     *
    49     * @since    1.0.0
    50      * @param      string               $hook             The name of the WordPress action that is being registered.
    51      * @param      object               $component        A reference to the instance of the object on which the action is defined.
    52     * @param      string               $callback         The name of the function definition on the $component.
    53     * @param      int      Optional    $priority         The priority at which the function should be fired.
    54     * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
    55     */
    56     public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
    57         $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
    58     }
     59    /**
     60     * Add a new filter to the collection to be registered with WordPress.
     61    *
     62    * @since    1.0.0
     63     * @param      string               $hook             The name of the WordPress filter that is being registered.
     64     * @param      object               $component        A reference to the instance of the object on which the filter is defined.
     65    * @param      string               $callback         The name of the function definition on the $component.
     66    * @param      int      Optional    $priority         The priority at which the function should be fired.
     67    * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
     68    */
     69    public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
     70        $this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
     71    }
    5972
    60     /**
    61      * Add a new filter to the collection to be registered with WordPress.
    62      *
    63      * @since    1.0.0
    64      * @param      string               $hook             The name of the WordPress filter that is being registered.
    65      * @param      object               $component        A reference to the instance of the object on which the filter is defined.
    66      * @param      string               $callback         The name of the function definition on the $component.
    67      * @param      int      Optional    $priority         The priority at which the function should be fired.
    68      * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
    69      */
    70     public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
    71         $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
    72     }
     73    /**
     74     * A utility function that is used to register the actions and hooks into a single
     75     * collection.
     76     *
     77     * @since    1.0.0
     78     * @access   private
     79     * @param      array                $hooks            The collection of hooks that is being registered (that is, actions or filters).
     80     * @param      string               $hook             The name of the WordPress filter that is being registered.
     81     * @param      object               $component        A reference to the instance of the object on which the filter is defined.
     82     * @param      string               $callback         The name of the function definition on the $component.
     83     * @param      int      Optional    $priority         The priority at which the function should be fired.
     84     * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
     85     * @return   type                                   The collection of actions and filters registered with WordPress.
     86     */
     87    private function add($hooks, $hook, $component, $callback, $priority, $accepted_args) {
    7388
    74     /**
    75      * A utility function that is used to register the actions and hooks into a single
    76      * collection.
    77      *
    78      * @since    1.0.0
    79      * @access   private
    80      * @param      array                $hooks            The collection of hooks that is being registered (that is, actions or filters).
    81      * @param      string               $hook             The name of the WordPress filter that is being registered.
    82      * @param      object               $component        A reference to the instance of the object on which the filter is defined.
    83      * @param      string               $callback         The name of the function definition on the $component.
    84      * @param      int      Optional    $priority         The priority at which the function should be fired.
    85      * @param      int      Optional    $accepted_args    The number of arguments that should be passed to the $callback.
    86      * @return   type                                   The collection of actions and filters registered with WordPress.
    87      */
    88     private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
     89        $hooks[] = array(
     90            'hook' => $hook,
     91            'component' => $component,
     92            'callback' => $callback,
     93            'priority' => $priority,
     94            'accepted_args' => $accepted_args
     95        );
    8996
    90         $hooks[] = array(
    91             'hook'          => $hook,
    92             'component'     => $component,
    93             'callback'      => $callback,
    94             'priority'      => $priority,
    95             'accepted_args' => $accepted_args
    96         );
     97        return $hooks;
     98    }
    9799
    98         return $hooks;
     100    /**
     101     * Register the filters and actions with WordPress.
     102     *
     103     * @since    1.0.0
     104     */
     105    public function run() {
    99106
    100     }
     107        foreach ($this->filters as $hook) {
     108            add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
     109        }
    101110
    102     /**
    103      * Register the filters and actions with WordPress.
    104      *
    105      * @since    1.0.0
    106      */
    107     public function run() {
    108 
    109         foreach ( $this->filters as $hook ) {
    110             add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
    111         }
    112 
    113         foreach ( $this->actions as $hook ) {
    114             add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
    115         }
    116 
    117     }
     111        foreach ($this->actions as $hook) {
     112            add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
     113        }
     114    }
    118115
    119116}
  • twilio-sms-for-woo/trunk/includes/class-twilio-sms-for-woo.php

    r1393730 r1453190  
    5757
    5858        $this->plugin_name = 'twilio-sms-for-woo';
    59         $this->version = '1.0.5';
     59        $this->version = '1.0.6';
    6060        $this->load_dependencies();
    6161        $this->set_locale();
     
    165165        $this->loader->add_action('woocommerce_order_status_failed_to_processing', $plugin_admin, 'twilio_send_admin_order_notification_sms', 10, 1);
    166166        $this->loader->add_action('woocommerce_order_status_failed_to_completed', $plugin_admin, 'twilio_send_admin_order_notification_sms', 10, 1);
    167        
    168         $this->loader->add_filter('twilio_sms_for_woo_paypal_args', $plugin_admin, 'twilio_sms_for_woo_paypal_args', 10, 1);       
     167
     168        $this->loader->add_filter('twilio_sms_for_woo_paypal_args', $plugin_admin, 'twilio_sms_for_woo_paypal_args', 10, 1);
    169169        $this->loader->add_filter('twilio_sms_for_woo_paypal_digital_goods_nvp_args', $plugin_admin, 'twilio_sms_for_woo_paypal_digital_goods_nvp_args', 10, 1);
    170170        $this->loader->add_filter('twilio_sms_for_woo_gateway_paypal_pro_payflow_request', $plugin_admin, 'twilio_sms_for_woo_gateway_paypal_pro_payflow_request', 10, 1);
     
    217217        }
    218218    }
    219 
    220219}
  • twilio-sms-for-woo/trunk/twilio-sms-for-woo.php

    r1393730 r1453190  
    66 * Plugin URI:        http://localleadminer.com/
    77 * Description:       WooCommerce Twilio SMS Notifications.
    8  * Version:           1.0.5
     8 * Version:           1.0.6
    99 * Author:            mbj-webdevelopment
    1010 * Author URI:        http://localleadminer.com/
     
    1414 * Domain Path:       /languages
    1515 */
    16 
    1716// If this file is called directly, abort.
    18 if ( ! defined( 'WPINC' ) ) {
    19     die;
     17if (!defined('WPINC')) {
     18    die;
    2019}
    2120if (!defined('TWILIO_SMS_FOR_WOO_LOG_DIR')) {
     
    2423}
    2524if (!defined('TWILLIO_PLUGIN_DIR_PATH')) {
    26     define('TWILLIO_PLUGIN_DIR_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ));
     25    define('TWILLIO_PLUGIN_DIR_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
    2726}
    2827
     
    3231 */
    3332function activate_twilio_sms_for_woo() {
    34     require_once plugin_dir_path( __FILE__ ) . 'includes/class-twilio-sms-for-woo-activator.php';
    35     Twilio_Sms_For_Woo_Activator::activate();
     33    require_once plugin_dir_path(__FILE__) . 'includes/class-twilio-sms-for-woo-activator.php';
     34    Twilio_Sms_For_Woo_Activator::activate();
    3635}
    3736
     
    4140 */
    4241function deactivate_twilio_sms_for_woo() {
    43     require_once plugin_dir_path( __FILE__ ) . 'includes/class-twilio-sms-for-woo-deactivator.php';
    44     Twilio_Sms_For_Woo_Deactivator::deactivate();
     42    require_once plugin_dir_path(__FILE__) . 'includes/class-twilio-sms-for-woo-deactivator.php';
     43    Twilio_Sms_For_Woo_Deactivator::deactivate();
    4544}
    4645
    47 register_activation_hook( __FILE__, 'activate_twilio_sms_for_woo' );
    48 register_deactivation_hook( __FILE__, 'deactivate_twilio_sms_for_woo' );
     46register_activation_hook(__FILE__, 'activate_twilio_sms_for_woo');
     47register_deactivation_hook(__FILE__, 'deactivate_twilio_sms_for_woo');
    4948
    5049/**
     
    5251 * admin-specific hooks, and public-facing site hooks.
    5352 */
    54 require plugin_dir_path( __FILE__ ) . 'includes/class-twilio-sms-for-woo.php';
     53require plugin_dir_path(__FILE__) . 'includes/class-twilio-sms-for-woo.php';
    5554
    5655/**
     
    6564function run_twilio_sms_for_woo() {
    6665
    67     $plugin = new Twilio_Sms_For_Woo();
    68     $plugin->run();
     66    $plugin = new Twilio_Sms_For_Woo();
     67    $plugin->run();
     68}
    6969
    70 }
    7170run_twilio_sms_for_woo();
Note: See TracChangeset for help on using the changeset viewer.