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

Welcart Nova 1.5をリリース

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

PHP8.0の対応

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

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

テンプレート修正 : category.php 61行目あたり
テンプレート修正 : front-page.php 114行目あたり
テンプレート修正 : search.php 37行目あたり
テンプレート修正 : wc_templates/wc_search_page.php 82行目あたり
テンプレート修正 : 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_nova' ); ?>
        <?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 554行目あたり
【変更前】
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';

/**
 * After setup theme

※ 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 97行目あたり
<?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 119行目あたり
    <div class="skuname"><?php usces_the_itemSkuDisp(); ?></div>
<?php endif; ?>

<?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 97行目あたり
    <div class="skuname"><?php echo apply_filters( 'usces_filter_autocharge_price_label', usces_the_itemSkuDisp( 'return' ) ); ?></div>
<?php endif; ?>

<?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’ ) を追加