Alpha SMS

Here you can set all the options for using the API

__( "[store_name] - Payment required for Order #[order_id]\nYour order #[order_id] at [store_name] is currently pending payment. Please complete payment as soon as possible.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_PROCESSING_SMS" => __( "[store_name] - Order #[order_id] is being processed\nYour order #[order_id] at [store_name] is currently being processed.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_ON_HOLD_SMS" => __( "[store_name] - Order #[order_id] is on hold\nYour order #[order_id] at [store_name] is currently on hold. Our customer service team will be reaching out to you shortly.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_COMPLETED_SMS" => __( "[store_name] - Order #[order_id] has been completed\nYour order #[order_id] at [store_name] has been completed and is on its way to you.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_CANCELLED_SMS" => __( "[store_name] - Order #[order_id] has been cancelled\nYour order #[order_id] at [store_name] has been cancelled. Please contact our customer service team for any questions or concerns.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_REFUNDED_SMS" => __( "[store_name] - Order #[order_id] has been refunded\nYour order #[order_id] at [store_name] has been refunded. Please contact our customer service team for any questions or concerns.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID. */ "DEFAULT_ORDER_STATUS_FAILED_SMS" => __( "[store_name] - Order #[order_id] has failed\nYour order #[order_id] at [store_name] has failed. Please contact our customer service team for any questions or concerns.", 'alpha-sms' ), /* translators: 1: Store name, 2: Order ID, 3: Order currency, 4: Order amount. */ "DEFAULT_ADMIN_STATUS_SMS" => __( "[store_name] - A new order #[order_id] for value [order_currency] [order_amount] has just been placed. Please check your admin dashboard for complete details.", 'alpha-sms' ) ]; //Grab all options $alpha_sms_options = get_option($this->plugin_name); $alpha_sms_api_key = (isset($alpha_sms_options['api_key']) && !empty($alpha_sms_options['api_key'])) ? $alpha_sms_options['api_key'] : ''; if (strlen($alpha_sms_api_key) === 40) { $alpha_sms_api_key = substr_replace(esc_attr($alpha_sms_options['api_key']), str_repeat('*', 24), 12, 16); } $alpha_sms_sender_id = (isset($alpha_sms_options['sender_id']) && !empty($alpha_sms_options['sender_id'])) ? esc_attr($alpha_sms_options['sender_id']) : ''; $alpha_sms_wp_reg = (isset($alpha_sms_options['wp_reg']) && !empty($alpha_sms_options['wp_reg'])) ? 1 : 0; $alpha_sms_wp_login = (isset($alpha_sms_options['wp_login']) && !empty($alpha_sms_options['wp_login'])) ? 1 : 0; $alpha_sms_wc_reg = (isset($alpha_sms_options['wc_reg']) && !empty($alpha_sms_options['wc_reg'])) ? 1 : 0; $alpha_sms_wc_login = (isset($alpha_sms_options['wc_login']) && !empty($alpha_sms_options['wc_login'])) ? 1 : 0; $alpha_sms_otp_checkout = (isset($alpha_sms_options['otp_checkout']) && !empty($alpha_sms_options['otp_checkout'])) ? 1 : 0; $alpha_sms_admin_phones = (isset($alpha_sms_options['admin_phones']) && !empty($alpha_sms_options['admin_phones'])) ? esc_attr($alpha_sms_options['admin_phones']) : ''; $alpha_sms_order_status_admin = (isset($alpha_sms_options['order_status_admin']) && !empty($alpha_sms_options['order_status_admin'])) ? 1 : 0; $alpha_sms_admin_status_sms = (isset($alpha_sms_options['ADMIN_STATUS_SMS']) && !empty($alpha_sms_options['ADMIN_STATUS_SMS'])) ? $alpha_sms_options['ADMIN_STATUS_SMS'] : $alpha_sms_order_alerts['DEFAULT_ADMIN_STATUS_SMS']; $alpha_sms_customer_statuses = []; $alpha_sms_wc_statuses = function_exists('wc_get_order_statuses') ? wc_get_order_statuses() : [ 'wc-pending' => __('Pending payment', 'alpha-sms'), 'wc-processing' => __('Processing', 'alpha-sms'), 'wc-on-hold' => __('On hold', 'alpha-sms'), 'wc-completed' => __('Completed', 'alpha-sms'), 'wc-cancelled' => __('Cancelled', 'alpha-sms'), 'wc-refunded' => __('Refunded', 'alpha-sms'), 'wc-failed' => __('Failed', 'alpha-sms'), ]; foreach ($alpha_sms_wc_statuses as $alpha_sms_status_key => $alpha_sms_status_label) { $alpha_sms_normalized = str_replace('-', '_', preg_replace('/^wc-/', '', $alpha_sms_status_key)); $alpha_sms_enabled_key = 'order_status_' . $alpha_sms_normalized; $alpha_sms_message_key = 'ORDER_STATUS_' . strtoupper($alpha_sms_normalized) . '_SMS'; $alpha_sms_default_key = 'DEFAULT_' . $alpha_sms_message_key; $alpha_sms_default_message = isset($alpha_sms_order_alerts[$alpha_sms_default_key]) ? $alpha_sms_order_alerts[$alpha_sms_default_key] : __("[store_name] - Order #[order_id] status updated\nHello [billing_first_name], your order #[order_id] at [store_name] is now [order_status].", 'alpha-sms'); $alpha_sms_customer_statuses[] = [ 'label' => wp_strip_all_tags($alpha_sms_status_label), 'enabled_key' => $alpha_sms_enabled_key, 'message_key' => $alpha_sms_message_key, 'enabled' => (isset($alpha_sms_options[$alpha_sms_enabled_key]) && !empty($alpha_sms_options[$alpha_sms_enabled_key])) ? 1 : 0, 'message' => (isset($alpha_sms_options[$alpha_sms_message_key]) && !empty($alpha_sms_options[$alpha_sms_message_key])) ? $alpha_sms_options[$alpha_sms_message_key] : $alpha_sms_default_message, ]; } $alpha_sms_customer_status_token_set = [ '[store_name]', '[billing_first_name]', '[order_id]', '[order_status]', '[order_date_created]', '[order_date_completed]', '[order_currency]', '[order_amount]', ]; if (!empty($alpha_sms_api_key)) { require_once ALPHA_SMS_PATH . 'includes/sms.class.php'; $alpha_sms_smsPortal = new Alpha_SMS_Class($alpha_sms_options['api_key']); $alpha_sms_response = $alpha_sms_smsPortal->getBalance(); if ($alpha_sms_response && $alpha_sms_response->error === 0) { $alpha_sms_balance = $alpha_sms_response->data->balance; } elseif ($alpha_sms_response && $alpha_sms_response->error === 405) { $alpha_sms_balance = 'Authentication Failed. Please enter a valid API Key.'; } else { $alpha_sms_balance = 'Unknown Error, failed to fetch balance.'; } } else { $alpha_sms_balance = "empty"; } settings_fields($this->plugin_name); do_settings_sections($this->plugin_name); ?>
Don't have an account? Register Now (Free SMS Credit after Sign-up). Balance: BDT

  1. />
  2. />

  1. />
  2. />
  3. />
  4. />

    [store_name] | [billing_first_name] | [order_id] | [order_status] | [order_date_created] | [order_currency] | [order_amount]
  5. />
    [store_name] | [billing_first_name] | [order_id] | [order_status] | [order_date_created] | [order_date_completed] | [order_currency] | [order_amount]