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

Welcart Square 1.4 をリリース

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

PHP8.0の対応

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

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

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

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

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

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

テンプレート修正 : category.php 68行目あたり
テンプレート修正 : front-page.php 86行目あたり
テンプレート修正 : search.php 42行目あたり
テンプレート修正 : wc_templates/wc_search_page.php 83行目あたり
テンプレート修正 : wc_templates/member/wc_favorite_page.php 79行目あたり
【変更前】
<?php if ( wcct_get_options( 'display_soldout' ) && ! usces_have_zaiko_anyone() ) : ?>
    <div class="itemsoldout">
        <div class="inner">
            <?php _e( 'SOLD OUT', 'welcart_basic_square' ); ?>
            <?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() ) に書き換え

テンプレート修正 : wc_templates/member/wc_favorite_page.php 69行目あたり
【変更前】
<?php
while ( $fv->have_posts() ) :
    $fv->the_post();
    usces_the_item();
    $post_id = get_the_ID();
    ?>
【変更後】
<?php
while ( $fv->have_posts() ) :
    $fv->the_post();
    usces_the_item();
    
    ?>

※ $post_id = get_the_ID(); を削除

テンプレート修正 : inc/front-customized.php 620行目あたり
【変更前】
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";
    $list .= '</div>' . "\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";
    $list .= '</div>' . "\n";

※ welcart_basic_soldout_label( get_the_ID(), ‘return’ ) に書き換え

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

フック追加 : wc_templates/wc_item_single.php 104行目あたり
<div class="right">
    <?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 127行目あたり
<div class="right">
    <?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 105行目あたり
<div class="right">
    <?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’ ) を追加