Welcart 2.7 へアップグレードを行うと一部動作しなくなる機能があるため各テーマも同時リリース予定です。
通常テーマをアップグレードするだけで修正が適用されますが、子テーマを利用されている場合はテンプレートの修正が必要になります。
商品データの仕様変更に伴って、データ取得の記述が変更になっています。
詳細は、5・6月に開催したセミナー時に公開した「商品データ構造の仕様変更とその影響」と「Welcart 2.7 のためのカスタマイズ修正」をご参照ください。
また、Welcart 2.7については下記記事もあわせてご参照してください。
目次
[ 親テーマ ] Welcart Basic
functions.php 352行目
変更前
$select_sku_switch = get_post_meta( $post->ID, '_select_sku_switch', true );変更後
$product = wel_get_product( $post->ID ); $select_sku_switch = $product['select_sku_switch'];
条件分岐処理記述を変更
変更前
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 != $select_sku_switch ) {変更後
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 !== (int) $select_sku_switch ) {
inc/template-functions.php 102行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/template-functions.php 110~111行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/template-functions.php 196行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/template-functions.php 205~206行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
[ 子テーマ ] Welcart Bordeaux
inc/front-customized.php 11行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 19~20行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 124行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 133~134行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 66行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 子テーマ ] Welcart Nova
inc/front-customized.php 11行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 19~20行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 112行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 121~122行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 66行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 子テーマ ] Welcart Square
inc/front-customized.php 11行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 19~20行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 111行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 120~121行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 66行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 子テーマ ] Welcart Carina
inc/front-customized.php 11行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 19~20行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 110行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 119~120行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 66行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 子テーマ ] Welcart VOLL
inc/front-customized.php 11行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 19~20行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 130行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 139~140行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 68行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 子テーマ ] Welcart Beldad
inc/front-customized.php 13行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 21~22行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/front-customized.php 131行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/front-customized.php 140~141行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 69行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 親テーマ ] Welcart Panetteria
functions.php 483行目
変更前
$select_sku_switch = get_post_meta( $post->ID, '_select_sku_switch', true );変更後
$product = wel_get_product( $post->ID ); $select_sku_switch = $product['select_sku_switch'];
条件分岐処理記述を変更
変更前
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 != $select_sku_switch ) {変更後
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 !== (int) $select_sku_switch ) {
inc/template-functions.php 106行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/template-functions.php 114~115行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/template-functions.php 200行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/template-functions.php 209~210行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
wc_templates/wc_review.php 65行目
変更前
$product_name = get_post_meta( $post->ID, '_itemName', true );変更後
$product = wel_get_product( $post->ID ); $product_name = $product['itemName'];
[ 親テーマ ] Welcart Mode
inc/coordinates/src/API/ItemData.php 26~27行目
変更前
$itemName = get_post_meta($item->ID, '_itemName', true); $itemCode = get_post_meta($item->ID, '_itemCode', true);変更後
$product = wel_get_product( $item->ID ); $itemName = $product['itemName']; $itemCode = $product['itemCode'];
inc/coordinates/src/Models/AssociatedSkus.php
修正範囲が広いためファイル自体を入れ替えてください。
inc/welcart/customized.php 45行目
変更前
$select_sku_switch = get_post_meta( $post->ID, '_select_sku_switch', true );変更後
$product = wel_get_product( $post->ID ); $select_sku_switch = $product['select_sku_switch'];
条件分岐処理記述を変更
変更前
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 != $select_sku_switch ) {変更後
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 !== (int) $select_sku_switch ) {
inc/welcart/customized.php 302行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/welcart/customized.php 310~311行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/welcart/customized.php 398行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/welcart/customized.php 407~408行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
[ 親テーマ ] Welcart Assertive
inc/welcart/front-customized.php 521行目
変更前
$select_sku_switch = get_post_meta( $post->ID, '_select_sku_switch', true );変更後
$product = wel_get_product( $post->ID ); $select_sku_switch = $product['select_sku_switch'];
条件分岐処理記述を変更
変更前
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 != $select_sku_switch ) {変更後
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 !== (int) $select_sku_switch ) {
inc/welcart/front-customized.php 547行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/welcart/front-customized.php 555~556行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
inc/welcart/front-customized.php 638行目
変更前
$regular_unit = get_post_meta( $post->ID, '_wcad_regular_unit', true );変更後
$product = wel_get_product( $post->ID ); $regular_unit = $product['wcad_regular_unit'];
inc/welcart/front-customized.php 647~648行目
変更前
$regular_interval = get_post_meta( $post->ID, '_wcad_regular_interval', true ); $regular_frequency = get_post_meta( $post->ID, '_wcad_regular_frequency', true );変更後
$regular_interval = $product['wcad_regular_interval']; $regular_frequency = $product['wcad_regular_frequency'];
[ 親テーマ ] Welcart Simple Plus
SKU Select とAuto Delivery を使用した時の商品詳細ページの表示不具合修正
inc/class-welcart-simpleplus-theme-setup.php 403行目
変更前
if ( ! defined( 'WCEX_SKU_SELECT' ) || '1' !== $select_sku_switch ) {変更後
if ( ! defined( 'WCEX_SKU_SELECT' ) || 1 !== (int) $select_sku_switch ) {