public static function init()
 {
     // 휴면계정 설정
     wskl_load_module('/includes/inactive-accounts/class-wskl-inactive-accounts.php', 'enable_inactive_accounts');
     // 한국 원화 표시 설정
     if (wskl_is_option_enabled('korean_won')) {
         add_filter('woocommerce_currencies', array(__CLASS__, 'callback_currencies'));
         add_filter('woocommerce_currency_symbol', array(__CLASS__, 'callback_currency_symbol'), 10, 2);
     }
     // SKU 사용 해제
     if (wskl_is_option_enabled('disable_sku')) {
         add_filter('wc_product_sku_enabled', '__return_false');
     }
     // 상점으로 돌아가기 버튼 해제
     if (wskl_is_option_enabled('disable_returntoshop')) {
         add_filter('woocommerce_return_to_shop_redirect', array(__CLASS__, 'callback_return_to_ship_redirect'));
     }
     if (WSKL()->is_request('frontend')) {
         // 관련상품표시
         if (absint(wskl_get_option('related_products_count'))) {
             $priority = absint(wskl_get_option('related_products_priority'));
             add_filter('woocommerce_output_related_products_args', array(__CLASS__, 'callback_related_products_args'), $priority);
         }
         /** 한국형 주소 및 체크아웃 필드 구성 */
         wskl_load_module('/includes/class-wskl-sym-checkout.php', 'enable_sym_checkout');
     }
     /** 입금인 지정 기능 (BACS 입금자 다른 이름) */
     wskl_load_module('/includes/class-wskl-bacs-payer-name.php', 'enable_bacs_payer_name');
     /** 복합과세 */
     wskl_load_module('/includes/class-wskl-combined-tax.php');
 }
 public function process_deactivation(array &$to_disabled, $target_role)
 {
     $post_id = wskl_get_option('inactive-accounts_post_deactivation');
     $shortcodes = WSKL()->submodules()->get_submodule('inactive-accounts')->shortcodes;
     $keys_to_preserve = array(wskl_get_option_name('inactive-accounts_alerted'));
     foreach ($to_disabled as $user) {
         wskl_deactivate_account($user, $this->cron_job_id, $keys_to_preserve, $target_role);
     }
     WSKL_Inactive_Accounts_Email::send_email($to_disabled, $post_id, $shortcodes);
 }
 public function __construct()
 {
     /**
      * 어드민 화면에서 통지하는 기능은 WSKL_Plugins_React 를 참고.
      *
      * @see WSKL_Plugins_React::wp_members()
      */
     if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
         return;
     }
     if (wskl_is_plugin_inactive(WP_MEMBERS_PLUGIN)) {
         return;
     }
     // 관리자 모듈
     if (WSKL()->is_request('admin')) {
         wskl_load_module('/includes/inactive-accounts/admin/class-wskl-inactive-accounts-admin.php');
         $this->admin = new WSKL_Inactive_Accounts_Admin();
     }
     /**
      * 사용자 로그인 시, 로그인 시각 기록
      *
      * @see wp-includes/user.php
      * @see wp_signon()
      */
     add_action('wp_login', array($this, 'set_login_data'), 10, 2);
     /**
      * 크론 스케쥴 확장 작업
      */
     add_filter('cron_schedules', array($this, 'add_cron_schedule'));
     if (wskl_debug_enabled()) {
         // 디버그 전용...
         add_filter('cron_request', array($this, 'add_xdebug_cookie_value'));
     }
     /**
      * 크론 스케쥴로 새성된 훅
      */
     add_action('wskl_inactive_accounts_check', array($this, 'do_interval_jobs'));
     /**
      * WP-Members 패스워드 초기화
      */
     add_action('wpmem_pwd_reset', array($this, 'recover_user_role'), 10, 1);
     // 나머지 모듈들
     wskl_load_module('/includes/inactive-accounts/class-wskl-inactive-accounts-email.php');
     wskl_load_module('/includes/inactive-accounts/admin/class-wskl-inactive-accounts-tinymce-buttons.php');
     wskl_load_module('/includes/inactive-accounts/class-wskl-inactive-accounts-shortcodes.php');
     $this->shortcodes = new WSKL_Inactive_Accounts_Shortcodes();
     if (wskl_debug_enabled()) {
         add_action('wp_ajax_inactive-accounts_test', array($this, 'test'));
     }
 }
コード例 #4
0
 public static function init()
 {
     /**
      * 문자 전송 제공자 모듈 파일 include 를 위한 action
      *
      * @see WSKL_Dabory_SMS_Trigger::init()
      * @see WSKL_Dabory_SMS_Admin::do_message_testing()
      * @see WSKL_Dabory_SMS_Admin::do_message_point()
      */
     add_action('dabory_sms_load_provider_module', array('WSKL_Dabory_SMS_Provider_Loading', 'load_provider_module'));
     if (WSKL()->is_request('admin')) {
         wskl_load_module('/includes/dabory-sms/admin/class-wskl-dabory-sms-admin.php');
     }
     wskl_load_module('/includes/dabory-sms/class-wskl-dabory-sms-trigger.php');
     WSKL_Dabory_SMS_Trigger::init();
 }
 public static function init()
 {
     /** 배송추적 */
     wskl_load_module('/includes/class-wskl-shipping-tracking.php', 'enable_ship_track');
     /** 바로 구매 */
     wskl_load_module('/includes/class-wskl-direct-purchase.php', 'enable_direct_purchase');
     /** 다보리 배송 */
     wskl_load_module('/includes/class-wskl-shipping-method.php', 'enable_korean_shipping');
     /** 다보리 멤버스 */
     wskl_load_module('/includes/dabory-members/class-wskl-dabory-members.php', 'enable_dabory_members');
     /** 다보리 SMS */
     wskl_load_module('/includes/dabory-sms/class-wskl-dabory-sms.php', 'enable_dabory_sms');
     /** 소셜 로그인 */
     wskl_load_module('/includes/lib/class-social-login.php', 'enable_social_login');
     /** IP blocking */
     wskl_load_module('/includes/class-wskl-ip-block.php', 'enable_countryip_block');
     if (WSKL()->is_request('frontend')) {
         // 상품 리뷰 탭 숨김
         if (wskl_is_option_enabled('hide_product_review_tab')) {
             add_filter('woocommerce_product_tabs', array(__CLASS__, 'callback_hide_product_review_tab'));
         }
     }
 }
        /**
         * @callback
         * @action    admin_notices
         * @used-by   Woosym_Korean_Localization::admin_notice_unauthorized()
         * @used-by   Woosym_Korean_Localization::init_extension_modules()
         */
        public static function output_unauthorized_extension()
        {
            $message = __('확장 기능 활성화 키가 인증되지 않았습니니다.', 'wskl');
            self::output_unauthorized($message);
        }
        /**
         * @callback
         * @action    admin_notices
         * @used-by   Woosym_Korean_Localization::admin_notice_unauthorized()
         * @used-by   Woosym_Korean_Localization::init_marketing_modules()
         */
        public static function output_unauthorized_marketing()
        {
            $message = __('마케팅 자동화 활성화 키가 인증되지 않았습니니다.', 'wskl');
            self::output_unauthorized($message);
        }
    }
}
function WSKL()
{
    return Woosym_Korean_Localization::instance();
}
$wskl = WSKL();
$wskl->startup();
$GLOBALS['wskl'] = $wskl;