{"id":14,"date":"2021-09-19T10:36:32","date_gmt":"2021-09-19T01:36:32","guid":{"rendered":"https:\/\/memo-log.net\/?p=14"},"modified":"2022-05-19T05:10:57","modified_gmt":"2022-05-18T20:10:57","slug":"welcart%e5%8f%97%e6%b3%a8%e3%83%aa%e3%82%b9%e3%83%88-%e4%b8%80%e6%8b%ac%e6%93%8d%e4%bd%9c%e3%81%a7%e7%8a%b6%e6%85%8b%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b%e9%96%a2%e6%95%b0%e3%82%92%e8%aa%ad","status":"publish","type":"post","link":"https:\/\/memo-log.net\/?p=14","title":{"rendered":"welcart\u53d7\u6ce8\u30ea\u30b9\u30c8 \u4e00\u62ec\u64cd\u4f5c\u3067\u72b6\u614b\u3092\u5909\u66f4\u3059\u308b\u95a2\u6570\u3092\u8aad\u89e3"},"content":{"rendered":"\n<p>welcart\u306e\u53d7\u6ce8\u30ea\u30b9\u30c8\u3067\u306f\u3001\u4e00\u62ec\u64cd\u4f5c\u306b\u3088\u308bstatus\uff08\u7ba1\u7406\u72b6\u614b\uff09\u306e\u5909\u66f4\u30fb\u66f4\u65b0\u304c\u3067\u304d\u308b\u3002<br>\u305d\u308c\u3092\u62c5\u3046\u95a2\u6570 usces_all_change_order_status \u306e\u51e6\u7406\u5185\u5bb9\u7b49\u306e\u30e1\u30e2\u3002<\/p>\n\n\n\n<p>file : plugins\/usc-e-shop\/functions\/function.php<br>@param WlcOrderList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 plugins\/usc-e-shop\/classes\/orderList2.class.php<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5229\u7528\u3067\u304d\u308b\u30d5\u30c3\u30af<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>default:\n\t\t$query = apply_filters( &#39;usces_filter_collective_order_status_query&#39;, $query, $statusstr, $id );<\/code><\/pre><\/div>\n\n\n\n<p>welcart\u304c\u7528\u610f\u3057\u305fstatus\uff08\u7ba1\u7406\u72b6\u614b\uff09\u306b\u8a72\u5f53\u3057\u306a\u3044\u5834\u5408\u306e\u66f4\u65b0\u7528query\u6587\u3092\u4f5c\u6210\u3059\u308b\u3002<br>\u72ec\u81ea\u306estatus\uff08\u7ba1\u7406\u72b6\u614b\uff09\u3092\u4f5c\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u300c\u3053\u3053\u3067\u66f4\u65b0\u7528query\u6587\u4f5c\u308c\u300d\u3068\u3044\u3046\u3053\u3068\u304b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>if ( $status ) {\n\t\tdo_action(&#39;usces_action_collective_order_status_each&#39;, $id, $statusstr, $old_status);\n}<\/code><\/pre><\/div>\n\n\n\n<p>\u304b\u306a\u308a\u4f7f\u3048\u305d\u3046\u306a\u30d5\u30c3\u30af\u3002status\uff08\u7ba1\u7406\u72b6\u614b\uff09\u306e\u66f4\u65b0\u304c\u6210\u529f\u3057\u305f\u5f8c\u306b\u4ed8\u3051\u8db3\u3057\u3066\u4f55\u304b\u3092\u3059\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u300c\u767a\u9001\u6e08\u307f\u300d\u306b\u5909\u66f4\u3057\u305f\u5f8c\u3001\u3064\u3044\u3067\u306b\u767a\u9001\u5b8c\u4e86\u30e1\u30fc\u30eb\u3082\u9001\u4fe1\u3059\u308b<\/li><li>\u300c\u5165\u91d1\u6e08\u307f\u300d\u306b\u5909\u66f4\u3057\u305f\u5f8c\u3001\u3064\u3044\u3067\u306b\u5165\u91d1\u78ba\u8a8d\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\uff06\u9818\u53ce\u66f8\u5370\u5237\u3059\u308b<\/li><\/ul>\n\n\n\n<p>\u4ed6\u306b\u3082\u30cd\u30c3\u30c8\u30b7\u30e7\u30c3\u30d7\u306e\u4ed5\u4e8b\u3092\u52b9\u7387\u5316\u3059\u308b\u305f\u3081\u306e\u30a4\u30ed\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u305d\u3046\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>do_action(&#39;usces_action_collective_order_status&#39;, array(&$obj));<\/code><\/pre><\/div>\n\n\n\n<p>\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\uff1f \u307e\u3060\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b8c\u4e86\u5f8c\u306e\u30e1\u30c3\u30bb\u30fc\u30b8<\/h2>\n\n\n\n<p>\u4e00\u62ec\u64cd\u4f5c\u5b8c\u4e86\u5f8c\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002<br>\u6700\u5f8c\u306e\u6ce8\u6587\u756a\u53f7\u306estatus\u304c\u6b63\u5e38\u306b\u5909\u66f4\u30fb\u66f4\u65b0\u3067\u304d\u305f\u5834\u5408\u3001\u300c\u4e00\u62ec\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u300d<br>\u6700\u5f8c\u306e\u6ce8\u6587\u756a\u53f7\u306estatus\u304c\u5909\u66f4\u30fb\u66f4\u65b0\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u300c\u30a8\u30e9\u30fc\uff1a\u51e6\u7406\u3092\u6b63\u5e38\u306b\u5b8c\u4e86\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u300d<\/p>\n\n\n\n<p>\u6700\u5f8c\u306e\u30c7\u30fc\u30bf\u306e\u66f4\u65b0\u7d50\u679c\u304ctrue\u304bfalse\u304b\u306e\u307f\u3092\u5224\u65ad\u3057\u3066\u8868\u793a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5909\u3048\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>function usces_all_change_order_status( &$obj ) {\n\tglobal $wpdb, $usces;\n\n\t$tableName = $wpdb-&gt;prefix . &quot;usces_order&quot;; \/\/\u5909\u66f4\u3057\u305f\u5024\u3092\u4fdd\u5b58\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u540d\n\t$ids = $_POST[&#39;listcheck&#39;]; \/\/(\u53d7\u6ce8\u30ea\u30b9\u30c8\u4e0a\u3067)\u30c1\u30a7\u30c3\u30af\u3055\u308c\u305f\u6ce8\u6587\u756a\u53f7\u306e\u914d\u5217\n\n\t\/\/\u30c1\u30a7\u30c3\u30af\u3055\u308c\u305f\u6ce8\u6587\u756a\u53f7\u3092\u30eb\u30fc\u30d7\u3057\u30661\u4ef6\u305a\u3064\u51e6\u7406\u3057\u3066\u3044\u304f\n\tforeach ( (array)$ids as $id ):\n\n\t\t$status = true; \/\/\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u7d50\u679c\u3092\u8868\u3059\u5909\u6570(\u30c7\u30d5\u30a9\u30eb\u30c8\u3067true\u306b\u3057\u3066\u304a\u304f)\n\n\t\t\/\/\u30eb\u30fc\u30d7\u4e2d\u306e\u6ce8\u6587\u756a\u53f7\u306eusces_order\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u9023\u60f3\u914d\u5217\u3067\u53d6\u5f97\n\t\t$query = $wpdb-&gt;prepare(&quot;SELECT order_status, mem_id, order_getpoint, order_usedpoint, order_payment_name FROM $tableName WHERE ID = %d&quot;, $id);\n\t\t$order_res = $wpdb-&gt;get_row( $query, ARRAY_A );\n\n\t\t\/\/\u53d6\u5f97\u3057\u305f\u9023\u60f3\u914d\u5217\u304b\u3089\u5909\u6570\u3092\u5b9a\u7fa9\n\t\t$statusstr = $order_res[&#39;order_status&#39;]; \/\/\u73fe\u5728\u306e\u7ba1\u7406\u72b6\u614b(\u5bfe\u5fdc\u72b6\u6cc1)\n\t\t$restore_point = false; \/\/\n\t\t$getpoint = $order_res[&#39;order_getpoint&#39;]; \/\/\u7372\u5f97\u30dd\u30a4\u30f3\u30c8\n\t\t$usedpoint = $order_res[&#39;order_usedpoint&#39;]; \/\/\u4f7f\u7528\u30dd\u30a4\u30f3\u30c8\n\t\t$old_status = $statusstr; \/\/\u73fe\u5728\u306e\u7ba1\u7406\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\n\n\t\t\/\/\u66f4\u65b0\u5f8c\u306e\u7ba1\u7406\u72b6\u614b\u3092\u5909\u6570\u306b\u5b9a\u7fa9(\u4f55\u306b\u5909\u66f4\u3059\u308b\u306e\u304b)\n\t\tif ( isset($_REQUEST[&#39;change&#39;][&#39;word&#39;]) && !is_array($_REQUEST[&#39;change&#39;][&#39;word&#39;]) ) {\n\t\t\t$change_word = $_REQUEST[&#39;change&#39;][&#39;word&#39;];\n\t\t} elseif ( isset($_REQUEST[&#39;change&#39;][&#39;word&#39;][&#39;order_reciept&#39;]) ) {\n\t\t\t$change_word = $_REQUEST[&#39;change&#39;][&#39;word&#39;][&#39;order_reciept&#39;];\n\t\t} elseif ( isset($_REQUEST[&#39;change&#39;][&#39;word&#39;][&#39;order_status&#39;]) ) {\n\t\t\t$change_word = $_REQUEST[&#39;change&#39;][&#39;word&#39;][&#39;order_status&#39;];\n\t\t} else {\n\t\t\t$change_word = &#39;&#39;;\n\t\t}\n\n\t\t\/\/\u66f4\u65b0\u5f8c\u306e\u7ba1\u7406\u72b6\u614b\u3054\u3068\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3059\u308b\u305f\u3081\u306equery\u6587\u3092\u4f5c\u6210\n\t\t$query = &#39;&#39;;\n\t\tswitch ( $change_word ) {\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u898b\u7a4d\u308a\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;estimate&#39;:\n\t\t\t\tif(strpos($statusstr, &#39;adminorder&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;adminorder&#39;, &#39;estimate&#39;, $statusstr);\n\t\t\t\t}else if(strpos($statusstr, &#39;estimate&#39;) === false) {\n\t\t\t\t\tif( &#39;,&#39; !== substr( $statusstr, -1 ) ) $statusstr .= &#39;,&#39;;\n\t\t\t\t\t$statusstr .= &#39;estimate,&#39;;\n\t\t\t\t}\n\t\t\t\tif( strpos($statusstr, &#39;cancel&#39;) === false ){\n\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u7ba1\u7406\u53d7\u6ce8\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;adminorder&#39;:\n\t\t\t\tif( strpos($statusstr, &#39;estimate&#39;) !== false ) {\n\t\t\t\t\t$statusstr = str_replace(&#39;estimate&#39;, &#39;adminorder&#39;, $statusstr);\n\t\t\t\t\tif( strpos($statusstr, &#39;cancel&#39;) === false ){\n\t\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(strpos($statusstr, &#39;adminorder&#39;) === false) {\n\t\t\t\t\tif( &#39;,&#39; !== substr( $statusstr, -1 ) ) $statusstr .= &#39;,&#39;;\n\t\t\t\t\t$statusstr .= &#39;adminorder,&#39;;\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u53d7\u6ce8\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;frontorder&#39;:\n\t\t\t\tif(strpos($statusstr, &#39;estimate&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;estimate,&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t\tif( strpos($statusstr, &#39;cancel&#39;) === false ){\n\t\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(strpos($statusstr, &#39;adminorder&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;adminorder,&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u53d6\u308a\u5bc4\u305b\u4e2d\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;duringorder&#39;:\n\t\t\t\tif( strpos($statusstr, &#39;cancel&#39;) !== false ) {\n\t\t\t\t\t$statusstr = str_replace(&#39;cancel&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t\tif( strpos($statusstr, &#39;estimate&#39;) === false ){\n\t\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;completion&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;completion&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;new&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;new&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;duringorder&#39;) === false) {\n\t\t\t\t\tif( &#39;,&#39; !== substr( $statusstr, -1 ) ) $statusstr .= &#39;,&#39;;\n\t\t\t\t\t$statusstr .= &#39;duringorder,&#39;;\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u30ad\u30e3\u30f3\u30bb\u30eb\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;cancel&#39;:\n\t\t\t\tif(strpos($statusstr, &#39;completion&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;completion&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;new&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;new&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;duringorder&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;duringorder&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;cancel&#39;) === false) {\n\t\t\t\t\tif( &#39;,&#39; !== substr( $statusstr, -1 ) ) $statusstr .= &#39;,&#39;;\n\t\t\t\t\t$statusstr .= &#39;cancel,&#39;;\n\t\t\t\t}\n\t\t\t\tif( strpos($statusstr, &#39;estimate&#39;) === false ){\n\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t$usedpoint = $usedpoint * -1;\/\/add point\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u767a\u9001\u6e08\u307f\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;completion&#39;:\n\t\t\t\tif(strpos($statusstr, &#39;new&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;new&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;duringorder&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;duringorder&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;cancel&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;cancel&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t\tif( strpos($statusstr, &#39;estimate&#39;) === false ){\n\t\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(strpos($statusstr, &#39;completion&#39;) === false) {\n\t\t\t\t\tif( &#39;,&#39; !== substr( $statusstr, -1 ) ) $statusstr .= &#39;,&#39;;\n\t\t\t\t\t$statusstr .= &#39;completion,&#39;;\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s, order_modified = %s WHERE ID = %d&quot;, $statusstr, substr(current_time(&#39;mysql&#39;), 0, 10), $id);\n\t\t\t\tbreak;\n\n\t\t\t\/\/\u66f4\u65b0\u5f8c\u306b\u300c\u65b0\u898f\u53d7\u4ed8\u300d\u306b\u3059\u308b\u5834\u5408\n\t\t\tcase &#39;new&#39;:\n\t\t\tcase &#39;neworder&#39;:\n\t\t\t\tif(strpos($statusstr, &#39;duringorder&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;duringorder,&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;completion&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;completion,&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t}\n\t\t\t\tif(strpos($statusstr, &#39;cancel&#39;) !== false) {\n\t\t\t\t\t$statusstr = str_replace(&#39;cancel,&#39;, &#39;&#39;, $statusstr);\n\t\t\t\t\t$statusstr = trim($statusstr, &#39;,&#39;);\n\t\t\t\t\tif( strpos($statusstr, &#39;estimate&#39;) === false ){\n\t\t\t\t\t\tif( usces_is_complete_settlement( $order_res[&#39;order_payment_name&#39;], $order_res[&#39;order_status&#39;] ) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t} elseif( $usces-&gt;is_status(&#39;receipted&#39;, $order_res[&#39;order_status&#39;]) ) {\n\t\t\t\t\t\t\t$restore_point = true;\n\t\t\t\t\t\t\t$getpoint = $getpoint * -1;\/\/add point\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = $wpdb-&gt;prepare(&quot;UPDATE $tableName SET order_status = %s WHERE ID = %d&quot;, $statusstr, $id);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$query = apply_filters( &#39;usces_filter_collective_order_status_query&#39;, $query, $statusstr, $id );\n\n\t\t} \/\/end switch ( $change_word )\n\n\t\t\/\/\u66f4\u65b0\u7528\u306equery\u6587\u3092\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\n\t\tif ( !empty ( $query ) ) { \/\/\u66f4\u65b0\u7528\u306equery\u6587\u304c\u3042\u308c\u3070\n\n\t\t\t$res = $wpdb-&gt;query( $query ); \/\/\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\n\t\t\tif ( $res === false ) { \/\/\u66f4\u65b0\u3067\u304d\u306a\u304b\u3063\u305f\u3089\n\t\t\t\t$status = false; \/\/\u66f4\u65b0\u7d50\u679c\u3092false\u306b\u3059\u308b\n\t\t\t}\n\n\t\t\t\/\/\u4f1a\u54e1\u5236\u3067\u30dd\u30a4\u30f3\u30c8\u5236\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306e\u51e6\u7406\n\t\t\tif ( &#39;activate&#39; == $usces-&gt;options[&#39;membersystem_state&#39;] && &#39;activate&#39; == $usces-&gt;options[&#39;membersystem_point&#39;] ) {\n\t\t\t\tif ( !empty($order_res[&#39;mem_id&#39;]) && ( 0 &lt; $order_res[&#39;order_getpoint&#39;] || 0 &lt; $order_res[&#39;order_usedpoint&#39;] ) ) {\n\t\t\t\t\tif( $res && $restore_point ) usces_restore_point( $order_res[&#39;mem_id&#39;], $getpoint + $usedpoint );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $status ) {\n\t\t\t\tdo_action(&#39;usces_action_collective_order_status_each&#39;, $id, $statusstr, $old_status);\n\t\t\t}\n\n\t\t} \/\/end if ( !empty ( $query ) )\n\n\tendforeach;\n\n\t\/\/\u3059\u3079\u3066\u306e\u6ce8\u6587\u756a\u53f7\u306e\u51e6\u7406\u3092\u7d42\u3048\u305f\u5f8c\u306b\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8a2d\u5b9a\n\tif ( true === $status ) { \/\/\u30eb\u30fc\u30d7\u306e\u4e00\u756a\u6700\u5f8c\u306e\u6ce8\u6587\u756a\u53f7\u306e\u66f4\u65b0\u7d50\u679c\u304ctrue\u306a\u3089\n\t\t$obj-&gt;set_action_status(&#39;success&#39;, __(&#39;I completed collective operation.&#39;,&#39;usces&#39;)); \/\/\u4e00\u62ec\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\n\t} elseif ( false === $status ) { \/\/\u30eb\u30fc\u30d7\u306e\u4e00\u756a\u6700\u5f8c\u306e\u6ce8\u6587\u756a\u53f7\u306e\u66f4\u65b0\u7d50\u679c\u304cfalse\u306a\u3089\n\t\t$obj-&gt;set_action_status(&#39;error&#39;, __(&#39;ERROR: I was not able to complete collective operation&#39;,&#39;usces&#39;)); \/\/\u30a8\u30e9\u30fc\uff1a\u51e6\u7406\u3092\u6b63\u5e38\u306b\u5b8c\u4e86\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n\t} else {\n\t\t$obj-&gt;set_action_status(&#39;none&#39;, &#39;&#39;);\n\t}\n\tdo_action(&#39;usces_action_collective_order_status&#39;, array(&$obj));\n\n}<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>welcart\u306e\u53d7\u6ce8\u30ea\u30b9\u30c8\u3067\u306f\u3001\u4e00\u62ec\u64cd\u4f5c\u306b\u3088\u308bstatus\uff08\u7ba1\u7406\u72b6\u614b\uff09\u306e\u5909\u66f4\u30fb\u66f4\u65b0\u304c\u3067\u304d\u308b\u3002\u305d\u308c\u3092\u62c5\u3046\u95a2\u6570 usces_all_change_order_status \u306e\u51e6\u7406\u5185\u5bb9\u7b49\u306e\u30e1\u30e2\u3002 file : plugins\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-welcart"],"_links":{"self":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":0,"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}