ソニーペイメントサービスの2つの決済モジュール

Welcart Carina 1.4 をリリース

Welcart Carina 1.4 をリリースしました。主な修正点は以下のとおりです。

PHP8.0の対応

修正内容につきましては該当箇所が多岐に渡る為、ファイル毎に照らし合わせをして修正をお願いいたします

在庫状態が「廃盤」「入荷待ち」でも一覧ページに「売り切れ」と表示される不具合を修正

テンプレート修正 : archive.php 38行目あたり
テンプレート修正 : category.php 59行目あたり
テンプレート修正 : front-page.php 112行目あたり
テンプレート修正 : search.php 34行目あたり
テンプレート修正 : wc_templates/wc_search_page.php 80行目あたり
テンプレート修正 : wc_templates/member/wc_favorite_page.php 72行目あたり
【変更前】
<?php if ( wcct_get_options( 'display_soldout' ) && ! usces_have_zaiko_anyone() ) : ?>
    <div class="itemsoldout">
        <div class="inner">
            <?php esc_html_e( 'SOLD OUT', 'welcart_basic_carina' ); ?>
            <?php if ( wcct_get_options( 'display_inquiry' ) ) : ?>
                <span class="text"><?php wcct_options( 'display_inquiry_text' ); ?></span>
            <?php endif; ?>
【変更後】
<?php if ( wcct_get_options( 'display_soldout' ) && ! usces_have_zaiko_anyone() ) : ?>
    <div class="itemsoldout">
        <div class="inner">
            <?php welcart_basic_soldout_label( get_the_ID() ); ?>
            <?php if ( wcct_get_options( 'display_inquiry' ) ) : ?>
                <span class="text"><?php wcct_options( 'display_inquiry_text' ); ?></span>
            <?php endif; ?>

※ welcart_basic_soldout_label( get_the_ID() ) に書き換え


テンプレート修正 : inc/front-customized.php 579行目あたり
【変更前】
if ( wcct_get_options( 'display_soldout' ) && ! usces_have_zaiko_anyone() ) {
    $list .= '<div class="itemsoldout">' . "\n";
    $list .= '<div class="inner">' . "\n";
    $list .= __( 'SOLD OUT', 'welcart_basic_carina' ) . "\n";
    if ( wcct_get_options( 'display_inquiry' ) ) {
        $list .= '<span class="text">' . wcct_get_options( 'display_inquiry_text' ) . '</span>' . "\n";
    }
【変更後】
if ( wcct_get_options( 'display_soldout' ) && ! usces_have_zaiko_anyone() ) {
    $list .= '<div class="itemsoldout">' . "\n";
    $list .= '<div class="inner">' . "\n";
    $list .= welcart_basic_soldout_label( get_the_ID(), 'return' ) . "\n";
    if ( wcct_get_options( 'display_inquiry' ) ) {
        $list .= '<span class="text">' . wcct_get_options( 'display_inquiry_text' ) . '</span>' . "\n";
    }

※ $list .= welcart_basic_soldout_label( get_the_ID(), ‘return’ ) . “\n”; に書き換え


テンプレート修正 : functions.php 19行目あたり
require dirname( __FILE__ ) . '/inc/theme-customizer.php';
require get_stylesheet_directory() . '/inc/front-customized.php';
require get_stylesheet_directory() . '/inc/term-customized.php';
require get_stylesheet_directory() . '/inc/template-functions.php';

/**
 * Welcart Setup

※ require get_stylesheet_directory() . ‘/inc/template-functions.php’; を追加


テンプレート追加 : inc/template-functions.php
inc/
   front-customized.php
   template-functions.php
   term-customized.php
   theme-customizer.php

※ inc ディレクトリ内に template-functions.php を配置

商品詳細ページにアクションフックを追加

フック追加 : wc_templates/wc_item_single.php 105行目あたり
<?php usces_the_itemGpExp(); ?>

<?php do_action( 'usces_theme_item_single_before_options' ); ?>

<?php if ( usces_is_options() ) : ?>
    <dl class="item-option">
        <?php while ( usces_have_options() ) : ?>

※ do_action( ‘usces_theme_item_single_before_options’ ) を追加


フック追加 : wc_templates/wc_item_single_data.php 126行目あたり
<?php usces_the_itemGpExp(); ?>

<?php do_action( 'usces_theme_item_single_before_options' ); ?>

<?php if ( usces_is_options() ) : ?>
    <dl class="item-option">
        <?php while ( usces_have_options() ) : ?>

※ do_action( ‘usces_theme_item_single_before_options’ ) を追加


フック追加 : wc_templates/wc_item_single_service.php 104行目あたり
<?php usces_the_itemGpExp(); ?>

<?php do_action( 'usces_theme_item_single_before_options' ); ?>

<?php if ( usces_is_options() ) : ?>
    <dl class="item-option autocharge">
        <?php while ( usces_have_options() ) : ?>

※ do_action( ‘usces_theme_item_single_before_options’ ) を追加