Quantcast
Channel: 코스모스팜 스레드
Viewing all articles
Browse latest Browse all 15413

우커머스 결제 페이지 주소검색 수정

$
0
0

www.comaad.co.kr 사이트에서

우커머스 결제를 진행하는데요..

 

결제 페이지에서 우편번호 검색이 안나타나고 국가에서 대한 민국을 선택해야 우편번호 검색 기능이 나타납니다.

이것을 국가필드는 없애고 바로 결제 화면에 우편번호 검색이 보여질 수 있도록 하고 싶은데요..

부탁 좀 드리겠습니다.

 

 

1. 현재 결제페이를 들어가면 아래 화면이 나타납니다. 여기서 대한민국이 되어 있을 경우는 다른 나라로 갔다가 다시 대한민국을 선택해야 우편번호 검색기능이 나타나서요..

너무 불편합니다. 

png&filename=%EA%B2%B0%EC%A0%9C%ED%8E%98%EC%9D%B4%EC%A7%80+%EA%B4%80%EB%A0%A801.png&org=1

 

2. 아래와 같이 대한민국 필드 '국가' 필드는 없애고 바로 아래화면처럼 보이게 하고 싶습니다. 

png&filename=%EA%B2%B0%EC%A0%9C%ED%8E%98%EC%9D%B4%EC%A7%80+%EA%B4%80%EB%A0%A802.png&org=1

 

3. 현재 plugins/wooshipping-postcode-kr/wooshipping-postcode-kr 파일의 코드 내용입니다.

<?php
/**
 * Plugin Name: WooShipping - Postcode KR
 * Description: Korean postal code search form using Daum API
 * Plugin URI: http://planet8.co/
 * Version: 1.0.4
 * Author: Planet8
 * Author URI: http://planet8.co
 * Requires at least: 3.8
 * Tested up to: 4.0
 *
 * Text Domain: wooshipping-postcode
 * Domain Path: /languages/
 *
 * @package  WooShipping
 * @category  Postcode
 * @author  gaegoms (gaegoms@gmail.com)
 */

if ( ! defined( 'ABSPATH' ) ) {
 exit; // Exit if accessed directly
}

if ( ! function_exists( 'WC' ) ) {
 return;
}

if ( ! class_exists( 'WooShipping_Postcode' ) ) :

final class WooShipping_Postcode {
 
 public $version = '1.0.4';
 
 public $api = null;
 
 protected static $_instance = null;
 
 public static function instance() {
  
  if ( is_null( self::$_instance ) ) {
   self::$_instance = new self();
  }
  
  return self::$_instance;
 }
 
 public function __construct() { 
  
  $this->define_constants();
  $this->load_plugin_textdomain();
  $this->includes();
  
  add_action( 'wp', array( $this, 'init' ) );
  add_action( 'wooshipping-postcode-available-pages', array( $this, 'available_pages' ) );
  
  do_action( 'wooshipping_postcode_loaded' );
 }
 
 private function define_constants() {
  define( 'WSP_FILE', __FILE__ );
  define( 'WSP_LANG', 'wooshipping-postcode' );
  define( 'WSP_VERSION', $this->version );
 }
 
 private function load_plugin_textdomain() {
  load_plugin_textdomain( WSP_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
 }
 
 private function includes() {  
  if ( is_admin() ) 
   include_once( 'includes/admin/class-wsp-admin.php' );  
 }
 
 public function init() {
  if ( apply_filters( 'wooshipping-postcode-available-pages', false ) && ! defined( 'DOING_CRON' ) ) {
   if ( ! defined( 'DOING_AJAX' ) ) {
    include_once( 'includes/class-wsp-assets.php' );
   }
   include_once( 'includes/class-wsp-fields.php' );
  }
 }
 
 public function available_pages( $enabled ) {
  $default_pages = array(
    wc_get_page_id( 'myaccount' ),
    wc_get_page_id( 'checkout' ),
  );
  if ( in_array( get_the_ID(), get_option( 'wooshipping_postcode_available_pages', $default_pages ) ) ) {
   $enabled = true;
  }
  
  return $enabled;
 }
 
}

function wooshipping_postcode() {
 return WooShipping_Postcode::instance();
}

endif;

$GLOBALS['wooshipping_postcode'] = wooshipping_postcode(); 

Viewing all articles
Browse latest Browse all 15413

Trending Articles