{"id":36,"date":"2022-08-09T09:10:58","date_gmt":"2022-08-09T00:10:58","guid":{"rendered":"https:\/\/memo-log.net\/?p=36"},"modified":"2022-08-09T15:06:17","modified_gmt":"2022-08-09T06:06:17","slug":"welcart%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9%e6%9b%b4%e6%96%b0%e3%81%ae%e6%b5%81%e3%82%8c%e3%83%bb%e4%bb%95%e7%b5%84%e3%81%bf","status":"publish","type":"post","link":"https:\/\/memo-log.net\/?p=36","title":{"rendered":"welcart\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u306e\u6d41\u308c\u30fb\u4ed5\u7d44\u307f"},"content":{"rendered":"\n<p>welcart\u306f\u30012.6, 2.7\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u5909\u308f\u308a\u307e\u3057\u305f\u3002<br>\u7279\u306b2.7\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f\u3001\u3053\u308c\u307e\u3067\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5237\u65b0\u3059\u308b\u5927\u5909\u9769\u3067\u3059\u3002<br>2.7\u3078\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u969b\u306b\u66f4\u65b0\u3057\u3066\u307f\u308b\u3068\u3001\u30a8\u30e9\u30fc\u3067\u4e0a\u624b\u304f\u3044\u304b\u306a\u3044\u3053\u3068\u304c\u4f55\u5ea6\u3082\u3042\u308a\u307e\u3057\u305f\u3002<br>2.6\u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br>2.7\u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u305d\u308c\u3060\u3051\u51e6\u7406\u3059\u308b\u4ed5\u4e8b\u91cf\u304c\u591a\u3044\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u306e\u6d41\u308c\u30fb\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u3001welcart\u306e\u30b7\u30b9\u30c6\u30e0\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u89e3\u3044\u3066\u3001\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u306b\u95a2\u308f\u308b\u52d5\u304d\u306f\u3001\u4e3b\u306b\u4e0b\u8a182\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>plugins\/usc-e-shop\/includes\/database\/db-update.php<\/li><li>plugins\/usc-e-shop\/includes\/database\/db-progress-screen.php<\/li><\/ol>\n\n\n\n<p>2\u756a\u76ee\u306edb-progress-screen.php\u306f\u3001\u66f4\u65b0\u306e\u9032\u6357\u72b6\u6cc1\u3092\u793a\u3059\u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u306e\u753b\u9762\u8868\u793a\u306b\u95a2\u3059\u308bHTML\u3068JavaScript(jQuery)\u3067\u3059\u3002<br>\u3057\u305f\u304c\u3063\u3066\u4ee5\u4e0b\u3067\u306f\u3001db-update.php\u306b\u8a18\u3055\u308c\u305f\u95a2\u6570\u3092\u8aad\u307f\u89e3\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">wel_db_check<\/h2>\n\n\n\n<p>\u3053\u306e\u95a2\u6570\u306f\u3001welcart\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u5f8c\u3001plugins_loaded\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<br>\u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u3001\u305d\u306e\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u3001\u4e0b\u8a18\u306e\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u30d0\u30fc\u30b8\u30e7\u30f32.7\u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u5834\u5408\u3001welcart\u898f\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u6709\u7121\u3092\u78ba\u8a8d\u3057\u3001\u7121\u3051\u308c\u3070\u4f5c\u6210\u3059\u308b\u3002\u3064\u307e\u308a\u30012.7\u304b\u3089\u65b0\u767b\u5834\u306e3\u30c6\u30fc\u30d6\u30eb usces_item, usces_skus, usces_opts \u306e\u307f\u304c\u4f5c\u6210\u3055\u308c\u308b\uff08\u305d\u306e\u4ed6\u306e\u898f\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb usces_order\u7b49\u306f\u3001\u65e2\u306b\u5b58\u5728\u3059\u308b\u3082\u306e\u304c\u4f7f\u308f\u308c\u308b\uff09\u3002<\/li><li>\u7ba1\u7406\u753b\u9762\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u304b\u5426\u304b\u3092\u5224\u65ad\u3059\u308b\u3002<\/li><li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u306e\u5fc5\u8981\u304c\u3042\u308c\u3070\u3001\u7ba1\u7406\u753b\u9762\u306b\u66f4\u65b0\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3002<\/li><li>\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u66f4\u65b0\u306e\u969b\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u3092\u884c\u3046\u95a2\u6570)\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/li><\/ol>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"plugins\/usc-e-shop\/includes\/database\/db-update.php\" data-lang=\"PHP\"><code>\/**\n * Database check.\n *\n * Database update check for each version.\n *\n * @since 2.6\n *\/\nfunction wel_db_check() {\n\n\n\t\/\/ \u7ba1\u7406\u753b\u9762\u3067\u306a\u3044\u306a\u3089\u4f55\u3082\u305b\u305a\u7d42\u4e86\n\tif ( ! is_admin() ) {\n\t\treturn;\n\t}\n\n\n\t\/\/ usc_e_shop\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u5ba3\u8a00\n\tglobal $usces;\n\n\n\t\/\/ option\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u72b6\u6cc1(usces_db_version)\u3092\u53d6\u5f97\n\t$update_history = get_option( &#39;usces_db_version&#39; ); \/\/ version number =&gt; \u66f4\u65b0\u72b6\u6cc1(1 or 0) \u3092\u8981\u7d20\u3068\u3059\u308b\u914d\u5217\n\n\t\/\/ $update_history\u914d\u5217\u306b\u6307\u5b9a\u3059\u308bkey(version number)\u3092\u521d\u671f\u5316\n\t$action_status  = &#39;&#39;;\n\n\t\/\/ \u6700\u521d\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb(true)\u304b\u3001\u65e2\u306bitem\u304c\u3042\u308b\u66f4\u65b0(false)\u304b \u306e\u771f\u507d\u5024\u3092\u53d6\u5f97\n\t$first_install  = wel_is_first_install();\n\n\n\t\/\/ welcart\u306e\u73fe\u5728version\u304c2.7\u4ee5\u964d\u306e\u5834\u5408\u306e\u51e6\u7406\n\tif ( version_compare( WEL_CURRENT_VERSION, &#39;2.7-beta&#39;, &#39;&gt;=&#39; ) ) {\n\n\t\t\/\/ \u691c\u8a3c\u306e\u305f\u3081\u306b\u66f4\u65b0\u72b6\u6cc1\u306e\u914d\u5217\u30c7\u30fc\u30bf\u306ekey\u30922.7\u306b\u6307\u5b9a\n\t\t$action_status = &#39;2.7&#39;;\n\n\t\t\/\/ welcart\u898f\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u6709\u7121\u3092\u78ba\u8a8d\u3057\u3066\u7121\u3051\u308c\u3070\u4f5c\u6210\u3059\u308b\n\t\t\/\/(\u901a\u5e38\u306fusces_item,usces_skus,usces_opts\u306e2.7\u304b\u3089\u767b\u5834\u306e3\u30c6\u30fc\u30d6\u30eb\u306e\u307f\u4f5c\u6210\u3055\u308c\u308b)\n\t\t$usces-&gt;create_table();\n\n\t\t\/\/ 2.7version\u306e\u66f4\u65b0\u72b6\u6cc1\u306e\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306e\u51e6\u7406\n\t\t\/\/ (\u3064\u307e\u308a2.7\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5f8c\u3001\u6700\u521d\u306eplugins_loaded\u30d5\u30c3\u30af\u304c\u5b9f\u884c\u3055\u308c\u308b\u6642)\n\t\tif ( ! isset( $update_history[ $action_status ] ) ) {\n\n\t\t\t\/\/ welcart\u306e\u6700\u521d\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3089\n\t\t\tif ( $first_install ) {\n\t\t\t\t$update_history[ $action_status ] = 1;\n\n\t\t\t\/\/ \u65e2\u306bitem\u304c\u3042\u308b\u66f4\u65b0\u306a\u3089\n\t\t\t} else {\n\t\t\t\t$update_history[ $action_status ] = 0;\n\t\t\t}\n\n\t\t\t\/\/ option\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u72b6\u6cc1(usces_db_version)\u3092\u3001\u4e0a\u8a18\u3067\u8a2d\u5b9a\u3055\u308c\u305f\u5024\u306b\u66f4\u65b0\n\t\t\tupdate_option( &#39;usces_db_version&#39;, $update_history );\n\n\t\t}\n\n\t};\n\n\n\t\/\/ welcart\u306e\u73fe\u5728version\u304c2.6\u4ee5\u964d\u306e\u5834\u5408\u306e\u51e6\u7406\n\tif ( version_compare( WEL_CURRENT_VERSION, &#39;2.6-beta&#39;, &#39;&gt;=&#39; ) ) {\n\t\t$action_status = &#39;2.6&#39;;\n\t\tif ( ! isset( $update_history[ $action_status ] ) ) {\n\t\t\tif ( $first_install ) {\n\t\t\t\t$update_history[ $action_status ] = 1;\n\t\t\t} else {\n\t\t\t\t$update_history[ $action_status ] = 0;\n\t\t\t}\n\t\t\tupdate_option( &#39;usces_db_version&#39;, $update_history );\n\t\t}\n\t};\n\t\/*\n\tif ( version_compare( WEL_CURRENT_VERSION, &#39;2.0-beta&#39;, &#39;&gt;=&#39; ) ) {\n\t\t$action_status = &#39;2.0&#39;;\n\t\tif ( ! isset( $update_history[ $action_status ] ) ) {\n\t\t\t$update_history[ $action_status ] = 0;\n\t\t\tupdate_option( &#39;usces_db_version&#39;, $update_history );\n\t\t}\n\t};\n\t*\/\n\n\n\t\/\/ \u66f4\u65b0\u72b6\u6cc1\u306e\u914d\u5217\u30c7\u30fc\u30bf\u304b\u3089\u3001\u300c\u7ba1\u7406\u753b\u9762\u306b\u66f4\u65b0\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u304b\u5426\u304b\u300d\u3001\u300c\u66f4\u65b0\u306e\u969b\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570\u540d\u300d\u3092\u8a2d\u5b9a\u3059\u308b\n\t$notice_flag = false; \/\/\u7ba1\u7406\u753b\u9762\u306b\u66f4\u65b0\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u304b\u5426\u304b\u306e\u30d5\u30e9\u30b0\u5909\u6570\n\n\t\/\/\u66f4\u65b0\u72b6\u6cc1\u306e\u914d\u5217\u30c7\u30fc\u30bf\u3092\u30eb\u30fc\u30d7\u3057\u3066\u3001\u5b9f\u884c\u3059\u308b\u95a2\u6570\u540d\u3068\u30d5\u30e9\u30b0\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\n\tforeach ( $update_history as $v =&gt; $f ) { \n\n\t\t\/\/ \u5b9f\u884c\u3059\u308b\u53ef\u5909\u95a2\u6570\u540d\u3092\u8a2d\u5b9a\n\t\t$function_name  = &#39;wel_update_db_&#39;;\n\t\t$function_name .= str_replace( &#39;.&#39;, &#39;_&#39;, $v ); \/\/ $v(version number)\u306e\u5c0f\u6570\u70b9\u3092_\u306b\u7f6e\u63db\u3057\u305f\u6587\u5b57\u5217\u3092\u672b\u5c3e\u306b\u8db3\u3059\n\n\t\t\/\/ \u8a2d\u5b9a\u3057\u305f\u95a2\u6570\u304c\u5b58\u5728\u3057\u3066\u3001\u304b\u3064\u3001\u65e2\u306bitem\u304c\u3042\u308b(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u304c\u5fc5\u8981)\u5834\u5408\u306e\u51e6\u7406\n\t\tif ( function_exists( $function_name ) && 0 === (int) $f ) {\n\t\t\t$notice_flag = true; \/\/ \u30d5\u30e9\u30b0\u5909\u6570\u306btrue\u3092\u8a2d\u5b9a\n\t\t\tbreak; \/\/1\u3064\u3067\u3082\u95a2\u6570\u540d\u3068\u30d5\u30e9\u30b0\u5909\u6570\u306btrue\u3092\u8a2d\u5b9a\u3057\u305f\u3089\u30eb\u30fc\u30d7\u3092\u7d42\u4e86\n\t\t}\n\n\t}\n\n\n\t\/\/ \u30d5\u30e9\u30b0\u5909\u6570\u304ctrue\u306a\u3089\u3001admin_notices\u30d5\u30c3\u30af\u3067\u7ba1\u7406\u753b\u9762\u306b\u66f4\u65b0\u901a\u77e5\u3092\u8868\u793a\u3059\u308b\u30b3\u30fc\u30eb\u30d0\u30c3\u30afwel_db_notice()\u95a2\u6570\u3092\u5b9f\u884c\n\tif ( $notice_flag ) {\n\t\tadd_action( &#39;admin_notices&#39;, &#39;wel_db_notice&#39; );\n\t}\n\n\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">wel_db_notice<\/h2>\n\n\n\n<p>wel_db_check\u95a2\u6570\u306e\u4e2d\u3067\u3001admin_notices\u30d5\u30c3\u30af\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3068\u3057\u3066\u547c\u3073\u51fa\u3055\u308c\u3066\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<br>\u4e0b\u8a18\u753b\u50cf\u306e\u66f4\u65b0\u901a\u77e5\u3092\u7ba1\u7406\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"644\" height=\"153\" src=\"https:\/\/memo-log.net\/wp-content\/uploads\/update_notification-644x153.png\" alt=\"\" class=\"wp-image-37\" srcset=\"https:\/\/memo-log.net\/wp-content\/uploads\/update_notification-644x153.png 644w, https:\/\/memo-log.net\/wp-content\/uploads\/update_notification-300x71.png 300w, https:\/\/memo-log.net\/wp-content\/uploads\/update_notification-768x182.png 768w, https:\/\/memo-log.net\/wp-content\/uploads\/update_notification-660x157.png 660w, https:\/\/memo-log.net\/wp-content\/uploads\/update_notification.png 880w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">wel_need_to_update_db<\/h2>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<br>option\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u72b6\u6cc1(usces_db_version)\u3092\u53d6\u5f97\u3057(\u914d\u5217)\u3001<br>\u2193<br>\u305d\u306e\u8981\u7d20\u306e\u5024\u306b0\u304c\u542b\u307e\u308c\u3066\u3044\u308c\u3070true(\u66f4\u65b0\u5fc5\u8981)\u3092\u30010\u304c\u7121\u3051\u308c\u3070false(\u66f4\u65b0\u4e0d\u8981)\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>usc_e_shop\u30af\u30e9\u30b9\u306eadmin_top_page\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"plugins\/usc-e-shop\/includes\/database\/db-update.php\" data-lang=\"PHP\"><code>\/**\n * Check if the database needs to be updated.\n *\n * @since 2.6\n * @return boolean Returns true if necessary.\n *\/\nfunction wel_need_to_update_db() {\n\t$update_history = get_option( &#39;usces_db_version&#39; );\n\tif ( in_array( 0, $update_history, true ) ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">wel_db_update_ajax<\/h2>\n\n\n\n<p>ajax\u901a\u4fe1\u306e\u969b\u306b<code>wp_ajax_wel_db_update_ajax<\/code>\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u5b9f\u884c\u3055\u308c\u308b\u95a2\u6570\u3067\u3059\u3002<br>\u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u5c65\u6b74\u3092\u7167\u4f1a\u3057\u3066\u3001\u672a\u66f4\u65b0\u306e\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u7528\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br>\u66f4\u65b0\u306e\u5177\u4f53\u7684\u306a\u51e6\u7406\u5185\u5bb9\u306f\u3001\u3053\u306e\u95a2\u6570\u5185\u3067\u5b9f\u884c\u3055\u308c\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u7528\u95a2\u6570\uff08wel_update_db_*\uff09\u306b\u5b9a\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"plugins\/usc-e-shop\/includes\/database\/db-update.php\" data-lang=\"PHP\"><code>\/**\n * Database update process.\n *\n * @since 2.6\n *\/\nfunction wel_db_update_ajax() {\n\n\t\/\/ \u5b9a\u6570USCES_DB_UP_INTERBAL\u306b10\u3092\u8a2d\u5b9a\n\tdefine( &#39;USCES_DB_UP_INTERBAL&#39;, 10 ); \/\/ \u5b9a\u6570\u540d\u304b\u3089\u306fajax\u901a\u4fe1\u6642\u306e\u30a4\u30f3\u30bf\u30fc\u30d0\u30eb\u6642\u9593\u304c\u60f3\u8d77\u3055\u308c\u308b\u304c\u3001\u4f7f\u308f\u308c\u3066\u3044\u308b\u5f62\u8de1\u306f\u7121\u3044\u3002\n\n\t\/\/ \u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u5c65\u6b74\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u82e5\u3044\u9806\u306b\u4e26\u3079\u66ff\u3048\u308b\n\t$update_history = get_option( &#39;usces_db_version&#39; ); \/\/option\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\u5c65\u6b74\u30c7\u30fc\u30bf(\u914d\u5217)\u3092\u53d6\u5f97\n\tksort( $update_history ); \/\/ \u914d\u5217\u306ekey(version number)\u3067\u6607\u9806\u306b\u4e26\u3079\u66ff\u3048\u308b\n\n\t\/\/ \u66f4\u65b0\u5c65\u6b74\u306e\u914d\u5217\u3092\u30eb\u30fc\u30d7\u3057\u3066\u672a\u66f4\u65b0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3059\u308b\n\tforeach ( $update_history as $version =&gt; $flag ) {\n\n\t\t\/\/ \u5b9f\u884c\u3059\u308b\u95a2\u6570\u540d\u306e\u63a5\u982d\u8f9e\u3092\u8a2d\u5b9a\n\t\t$function_name = &#39;wel_update_db_&#39;;\n\n\t\t\/\/ flag\u5909\u6570\u304c0(\u66f4\u65b0\u5c65\u6b74\u306a\u3057)\u306e\u5834\u5408\u306e\u51e6\u7406\n\t\tif ( 0 === $flag ) {\n\n\t\t\t\/\/ \u95a2\u6570\u540d\u306e\u672b\u5c3e\u306b\u3001$version(version number)\u306e\u5c0f\u6570\u70b9\u3092_\u306b\u7f6e\u63db\u3057\u305f\u6587\u5b57\u5217\u3092\u8db3\u3059\n\t\t\t$function_name .= str_replace( &#39;.&#39;, &#39;_&#39;, $version );\n\n\t\t\t\/\/ \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0)\n\t\t\t$function_name( $version );\n\t\t\tbreak; \/\/ \u3069\u308c\u304b1\u3064\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3057\u305f\u3089\u30eb\u30fc\u30d7\u3092\u7d42\u4e86\n\n\t\t}\n\n\t}\n\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">wel_update_db_2_7<\/h2>\n\n\n\n<p>\u30d0\u30fc\u30b8\u30e7\u30f32.7\u3078\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u969b\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u73fe\u5728\u8aad\u89e3\u4e2d\u3002\u8aad\u307f\u89e3\u304d\u6b21\u7b2c\u30e1\u30e2\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>welcart\u306f\u30012.6, 2.7\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u5909\u308f\u308a\u307e\u3057\u305f\u3002\u7279\u306b2.7\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306f\u3001\u3053\u308c\u307e\u3067\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5237\u65b0\u3059\u308b\u5927\u5909\u9769\u3067\u3059\u30022.7\u3078\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059 [&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-36","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\/36","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=36"}],"version-history":[{"count":0,"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"wp:attachment":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}