<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[Warning: sprintf 오류가 발생합니다.]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/20403</link>
		<description><![CDATA[<p>어떤부분이 문제인지 해결 방법을 알고 싶습니다.</p>

<p>오류메시지</p>

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

<p><strong>settings-flat-rate.php의</strong>  <strong>47라인 입니다.</strong></p>

<p>'description'    =&gt; sprintf( __( 'These costs can optionally be added based on the &lt;a href="%s"&gt;product shipping class&lt;/a&gt;.', 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&amp;tab=shipping&amp;section=classes' ) ),</p>

<p>전체내용</p>

<p>&lt;?php</p>

<p>if ( ! defined( 'ABSPATH' ) ) {<br />
 exit;<br />
}</p>

<p>$cost_desc = __( 'Enter a cost (excl. tax) or sum, e.g. &lt;code&gt;10.00 * [qty]&lt;/code&gt;.', 'woocommerce' ) . '&lt;br/&gt;&lt;br/&gt;' . __( 'Use &lt;code&gt;[qty]&lt;/code&gt; for the number of items, &lt;br/&gt;&lt;code&gt;[cost]&lt;/code&gt; for the total cost of items, and &lt;code&gt;[fee percent="10" min_fee="20" max_fee=""]&lt;/code&gt; for percentage based fees.', 'woocommerce' );</p>

<p>/**<br />
 * Settings for flat rate shipping.<br />
 */<br />
$settings = array(<br />
 'title' =&gt; array(<br />
  'title'   =&gt; __( 'Method title', 'woocommerce' ),<br />
  'type'    =&gt; 'text',<br />
  'description'  =&gt; __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),<br />
  'default'  =&gt; __( 'Flat rate', 'woocommerce' ),<br />
  'desc_tip'  =&gt; true,<br />
 ),<br />
 'tax_status' =&gt; array(<br />
  'title'   =&gt; __( 'Tax status', 'woocommerce' ),<br />
  'type'    =&gt; 'select',<br />
  'class'         =&gt; 'wc-enhanced-select',<br />
  'default'   =&gt; 'taxable',<br />
  'options'  =&gt; array(<br />
   'taxable'  =&gt; __( 'Taxable', 'woocommerce' ),<br />
   'none'   =&gt; _x( 'None', 'Tax status', 'woocommerce' ),<br />
  ),<br />
 ),<br />
 'cost' =&gt; array(<br />
  'title'   =&gt; __( 'Cost', 'woocommerce' ),<br />
  'type'    =&gt; 'text',<br />
  'placeholder' =&gt; '',<br />
  'description' =&gt; $cost_desc,<br />
  'default'  =&gt; '0',<br />
  'desc_tip'  =&gt; true,<br />
 ),<br />
);</p>

<p>$shipping_classes = WC()-&gt;shipping-&gt;get_shipping_classes();</p>

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

<p>return $settings;</p>
]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

올려주신 코드상에 문제는 없어 보입니다.

다만 의심되는 건 번역된 메시지에 문제가 ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/20413</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>올려주신 코드상에 문제는 없어 보입니다.</p>

<p>다만 의심되는 건 번역된 메시지에 문제가 있을 듯합니다.</p>

<p>번역을 제거하고 아래처럼 영문으로 출력되게 해보시겠어요?</p>

<pre>
<code>'description' =&gt; sprintf( 'These costs can optionally be added based on the &lt;a href="%s"&gt;product shipping class&lt;/a&gt;.', admin_url( 'admin.php?page=wc-settings&amp;tab=shipping&amp;section=classes' ) ),</code></pre>

<p>원하시면 한글로 직접 단어를 수정해주셔도 됩니다.</p>

<p>고맙습니다.</p>
]]></description>
			<author>스레드봇</author>
			<pubDate>Sat, 03 Mar 2018 03:35:29 +0000</pubDate>
			<category>워드프레스</category>
		</item>
			</channel>
</rss>