Home 게시판 커뮤니티 Q&A 사이트 상단에 오류가 뜹니다. 어떻게 해야 할까요?

Tagged
1 voice, 0개 답변
  • Avatar of 김동영김동영
    Participant
    @yjakdy
    #52031

    Front Page

    로그인해서 결제페이지만 들어가면 플러그인 때문인지 경고문이 뜹니다.

    경고문이 안나오게 할 방법 좀 부탁드립니다

    오류구문

    Warning: sprintf(): Too few arguments in /home/arkmo/html/wp-content/plugins/woocommerce/includes/shipping/flat-rate/includes/settings-flat-rate.php on line 47

    settings-flat-rate.php 의 47라인 구문

    ‘description’    => sprintf( __( ‘These costs can optionally be added based on the product shipping class.’, ‘woocommerce’ ), admin_url( ‘admin.php?page=wc-settings&tab=shipping&section=classes’ ) ),

    전체 내용

    $settings = array(
    ‘title’ => array(
    ‘title’   => __( ‘Method title’, ‘woocommerce’ ),
    ‘type’    => ‘text’,
    ‘description’  => __( ‘This controls the title which the user sees during checkout.’, ‘woocommerce’ ),
    ‘default’  => __( ‘Flat rate’, ‘woocommerce’ ),
    ‘desc_tip’  => true,
    ),
    ‘tax_status’ => array(
    ‘title’   => __( ‘Tax status’, ‘woocommerce’ ),
    ‘type’    => ‘select’,
    ‘class’         => ‘wc-enhanced-select’,
    ‘default’   => ‘taxable’,
    ‘options’  => array(
    ‘taxable’  => __( ‘Taxable’, ‘woocommerce’ ),
    ‘none’   => _x( ‘None’, ‘Tax status’, ‘woocommerce’ ),
    ),
    ),
    ‘cost’ => array(
    ‘title’   => __( ‘Cost’, ‘woocommerce’ ),
    ‘type’    => ‘text’,
    ‘placeholder’ => ”,
    ‘description’ => $cost_desc,
    ‘default’  => ‘0’,
    ‘desc_tip’  => true,
    ),
    );

    $shipping_classes = WC()->shipping->get_shipping_classes();

    if ( ! empty( $shipping_classes ) ) {
    $settings[‘class_costs’] = array(
    ‘title’    => __( ‘Shipping class costs’, ‘woocommerce’ ),
    ‘type’    => ‘title’,
    ‘default’        => ”,
    ‘description’    => sprintf( __( ‘These costs can optionally be added based on the product shipping class.’, ‘woocommerce’ ), admin_url( ‘admin.php?page=wc-settings&tab=shipping&section=classes’ ) ),
    );
    foreach ( $shipping_classes as $shipping_class ) {
    if ( ! isset( $shipping_class->term_id ) ) {
    continue;
    }
    $settings[ ‘class_cost_’ . $shipping_class->term_id ] = array(
    /* translators: %s: shipping class name */
    ‘title’       => sprintf( __( ‘”%s” shipping class cost’, ‘woocommerce’ ), esc_html( $shipping_class->name ) ),
    ‘type’        => ‘text’,
    ‘placeholder’ => __( ‘N/A’, ‘woocommerce’ ),
    ‘description’ => $cost_desc,
    ‘default’     => $this->get_option( ‘class_cost_’ . $shipping_class->slug ), // Before 2.5.0, we used slug here which caused issues with long setting names
    ‘desc_tip’    => true,
    );
    }
    $settings[‘no_class_cost’] = array(
    ‘title’       => __( ‘No shipping class cost’, ‘woocommerce’ ),
    ‘type’        => ‘text’,
    ‘placeholder’ => __( ‘N/A’, ‘woocommerce’ ),
    ‘description’ => $cost_desc,
    ‘default’     => ”,
    ‘desc_tip’    => true,
    );
    $settings[‘type’] = array(
    ‘title’   => __( ‘Calculation type’, ‘woocommerce’ ),
    ‘type’    => ‘select’,
    ‘class’         => ‘wc-enhanced-select’,
    ‘default’   => ‘class’,
    ‘options’   => array(
    ‘class’  => __( ‘Per class: Charge shipping for each shipping class individually’, ‘woocommerce’ ),
    ‘order’  => __( ‘Per order: Charge shipping for the most expensive shipping class’, ‘woocommerce’ ),
    ),
    );
    }

    return $settings;

    제가 어떤부분을 어떻게 수정해야 할지 전혀 모르겠습니다. 도움부탁합니다.

1 글 보임 - 1에서 1 까지 (총 1 중에서)
  • 답변은 로그인 후 가능합니다.