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

Welcart Nova 1.6.2 をリリース

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

PHP8.2対応

テンプレート修正 : inc/theme-customizer.php 664行目~754行目あたり

/**
 * Get options
 *
 * @param string $key key.
 * @return mixed
 */
function wcct_get_options( $key = '' ) {
    if ( empty( $key ) ) {
        return null;
    }

    $options = get_option( 'basic_type_options' );

    if ( ! is_admin() ) {
        if ( ! isset( $options['logo'] ) ) {
            $options['logo'] = '';
        }
        if ( ! isset( $options['facebook_id'] ) ) {
            $options['facebook_id'] = '';
        }
        if ( ! isset( $options['facebook_button'] ) ) {
            $options['facebook_button'] = false;
        }
        if ( ! isset( $options['twitter_id'] ) ) {
            $options['twitter_id'] = '';
        }
        if ( ! isset( $options['twitter_button'] ) ) {
            $options['twitter_button'] = false;
        }
        if ( ! isset( $options['instagram_id'] ) ) {
            $options['instagram_id'] = '';
        }
        if ( ! isset( $options['instagram_button'] ) ) {
            $options['instagram_button'] = false;
        }
        if ( ! isset( $options['home_cat_title'] ) ) {
            $options['home_cat_title'] = false;
        }
        if ( ! isset( $options['sidebar'] ) ) {
            $options['sidebar'] = 'right-set';
        }
        if ( ! isset( $options['display_soldout'] ) ) {
            $options['display_soldout'] = true;
        }
        if ( ! isset( $options['display_inquiry'] ) ) {
            $options['display_inquiry'] = true;
        }
        if ( ! isset( $options['display_inquiry_text'] ) ) {
            $options['display_inquiry_text'] = __( 'Contacting this item', 'welcart_basic_nova' );
        }
        if ( ! isset( $options['display_produt_tag'] ) ) {
            $options['display_produt_tag'] = true;
        }
        if ( ! isset( $options['cart_button'] ) ) {
            $options['cart_button'] = __( 'Add to Shopping Cart', 'usces' );
        }
        if ( ! isset( $options['inquiry_link'] ) ) {
            $options['inquiry_link'] = 0;
        }
        if ( ! isset( $options['inquiry_link_button'] ) ) {
            $options['inquiry_link_button'] = false;
        }
        if ( ! isset( $options['review'] ) ) {
            $options['review'] = false;
        }
        if ( ! isset( $options['continue_shopping_button'] ) ) {
            $options['continue_shopping_button'] = false;
        }
        if ( ! isset( $options['continue_shopping_url'] ) ) {
            $options['continue_shopping_url'] = '';
        }
        if ( ! isset( $options['display_info'] ) ) {
            $options['display_info'] = true;
        }
        if ( ! isset( $options['info_cat'] ) ) {
            $options['info_cat'] = wcct_get_info_default();
        }
        if ( ! isset( $options['info_num'] ) ) {
            $options['info_num'] = 10;
        }
        if ( ! isset( $options['cat_image'] ) ) {
            $options['cat_image'] = true;
        }
    }

    if ( empty( $options[ $key ] ) ) {
        return null;
    }

    return $options[ $key ];
}
/**
 * Get options
 *
 * @param string $key key.
 * @return mixed
 */
function wcct_get_options( $key = '' ) {

    $option_value = null;
    if ( empty( $key ) ) {
        return $option_value;
    }

    $options = get_option( 'basic_type_options' );

    if ( ! is_admin() ) {
        if ( isset( $options[ $key ] ) ) {
            $option_value = $options[ $key ];
        } else {
            switch ( $key ) {
                case 'logo':
                    $option_value = '';
                    break;
                case 'facebook_id':
                    $option_value = '';
                    break;
                case 'facebook_button':
                    $option_value = false;
                    break;
                case 'twitter_id':
                    $option_value = '';
                    break;
                case 'twitter_button':
                    $option_value = false;
                    break;
                case 'instagram_id':
                    $option_value = '';
                    break;
                case 'instagram_button':
                    $option_value = false;
                    break;

                case 'home_cat_title':
                    $option_value = false;
                    break;
                case 'sidebar':
                    $option_value = 'right-set';
                    break;
                case 'display_soldout':
                    $option_value = true;
                    break;
                case 'display_inquiry':
                    $option_value = true;
                    break;
                case 'display_inquiry_text':
                    $option_value = __( 'Contacting this item', 'welcart_basic_nova' );
                    break;
                case 'display_produt_tag':
                    $option_value = true;
                    break;

                case 'cart_button':
                    $option_value = __( 'Add to Shopping Cart', 'usces' );
                    break;
                case 'inquiry_link':
                    $option_value = 0;
                    break;
                case 'inquiry_link_button':
                    $option_value = false;
                    break;
                case 'review':
                    $option_value = false;
                    break;

                case 'continue_shopping_button':
                    $option_value = false;
                    break;
                case 'continue_shopping_url':
                    $option_value = '';
                    break;

                case 'display_info':
                    $option_value = true;
                    break;
                case 'info_cat':
                    $option_value = wcct_get_info_default();
                    break;
                case 'info_num':
                    $option_value = 10;
                    break;
                case 'cat_image':
                    $option_value = true;
                    break;
            }
        }
    }

    return $option_value;
}

get_terms() の引数指定方法を変更

テンプレート修正 : front-page.php 17行目あたり

$target_terms = get_terms( 'category', array( 'child_of' => usces_get_cat_id( 'item' ) ) );
$target_arg   = array(
    'taxonomy' => 'category',
    'child_of' => usces_get_cat_id( 'item' ),
);
$target_terms = get_terms( $target_arg );

テンプレート修正 : inc/theme-customizer.php 771行目~775行目あたり

$target_arg   = array(

    'hide_empty'   => false,
    'exclude_tree' => usces_get_cat_id( 'item' ),
);
$target_terms = get_terms( 'category', $target_arg );
$target_arg   = array(
    'taxonomy'     => 'category',
    'hide_empty'   => false,
    'exclude_tree' => usces_get_cat_id( 'item' ),
);
$target_terms = get_terms( $target_arg );

ページネーションのエラーを修正

テンプレート修正 : archive.php 59行目~68行目あたり

テンプレート修正 : category.php 130行目~139行目あたり

テンプレート修正 : index.php 52行目~61行目あたり

テンプレート修正 : search.php 68行目~77行目あたり

<div class="pagination_wrapper">
    <?php
    $args = array(
        'type'      => 'list',
        'prev_text' => __( ' &laquo; ', 'welcart_basic' ),
        'next_text' => __( ' &raquo; ', 'welcart_basic' ),
    );
    echo wp_kses_post( paginate_links( $args ) );
    ?>
</div><!-- .pagenation-wrapper -->
<?php
$args           = array(
    'type'      => 'list',
    'prev_text' => __( ' &laquo; ', 'welcart_basic' ),
    'next_text' => __( ' &raquo; ', 'welcart_basic' ),
);
$paginate_links = paginate_links( $args );
if ( $paginate_links ) :
    ?>
<div class="pagination_wrapper">
    <?php echo wp_kses_post( $paginate_links ); ?>
</div><!-- .pagenation-wrapper -->
    <?php
endif;
?>

ロゴ画像を削除した際、サイトタイトルが表示されない不具合を修正

ロゴ画像を設定した状態で、メディアからロゴ画像を削除すると404エラーとなりバツ印マークが表示されます。サイトタイトルが表示されるように修正しました。

関数追加 : inc/template-functions.php

/**
 * Save blank values
 *
 * @param string $input Text.
 * @return string
 */
function welcart_basic_callback_esc_url_raw( $input ) {
    return ( '' === $input ) ? '' : esc_url_raw( $input );
}

テンプレート修正 : inc/theme-customizer.php 24行目あたり

$wp_customize->add_setting(
    'basic_type_options[logo]',
    array(
        'default'           => '',
        'type'              => 'option',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_setting(
    'basic_type_options[logo]',
    array(
        'default'           => '',
        'type'              => 'option',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'welcart_basic_callback_esc_url_raw',
    )
);

カテゴリー画像選択時、ログインユーザー以外がアップロードした画像を選択できない不具合を修正

テンプレート修正 : inc/term-customized.php 106行目~117行目あたり

file_frame = wp.media.frames.file_frame = wp.media({
    title: '<?php esc_html_e( 'Category image', 'welcart_basic_nova' ); ?>',
    library: {
        type: 'image',
        author: userSettings.uid
    },
    button: {
        text: '<?php esc_html_e( 'Set the category image', 'welcart_basic_nova' ); ?>',
        close: true
    },
    multiple: false
});
file_frame = wp.media.frames.file_frame = wp.media({
    title: '<?php esc_html_e( 'Category image', 'welcart_basic_nova' ); ?>',
    library: {
        type: 'image',

    },
    button: {
        text: '<?php esc_html_e( 'Set the category image', 'welcart_basic_nova' ); ?>',
        close: true
    },
    multiple: false
});

マイページ関連ページのボタン崩れ

CSS修正 : auto_delivery.css 145行目~156行目あたり

#wc_autodelivery_history .send input {
    background-color: #d3222a;
    color: #fff;
}

#wc_autodelivery_history .send input:hover {
    background-color: #e25157;
    -moz-box-shadow: 0 2px #d3222a;
    -webkit-box-shadow: 0 2px #d3222a;
    box-shadow: 0 2px #d3222a;
}
#wc_autodelivery_history .send input {
    color: #fff;
    background-color: #c2c3c3;
    -moz-box-shadow: 0 3px #a5a6a7;
    -webkit-box-shadow: 0 3px #a5a6a7;
    box-shadow: 0 3px #a5a6a7;
}

#wc_autodelivery_history .send input:hover {
    background-color: #d6d6d6;
    -moz-box-shadow: 0 3px #c2c3c3;
    -webkit-box-shadow: 0 3px #c2c3c3;
    box-shadow: 0 3px #c2c3c3;
}

class追加 : usces_cart.css 16行目~30行目あたり

.cart-page input[type=button],
.cart-page input[type=submit],
.cart-page input[type=reset],
.member-page input[type=button],
.member-page input[type=submit],
.member-page input[type=reset],
.member_submenu a.usces_logout_a,
.gotoedit a,
.gotoedit a,

.member-page #memberinfo .send input.top,
#wc_ordercompletion .send a,
#wc_lostmemberpassword #nav a,
#wc_lostcompletion #memberpages p a,
#wc_lostcompletion .send a,
.member-page #memberinfo .send input.deletemember {
.cart-page input[type=button],
.cart-page input[type=submit],
.cart-page input[type=reset],
.member-page input[type=button],
.member-page input[type=submit],
.member-page input[type=reset],
.member_submenu a.usces_logout_a,
.gotoedit a,
.gotoedit a,
.member-page #memberedit .send input.top,
.member-page #memberinfo .send input.top,
#wc_ordercompletion .send a,
#wc_lostmemberpassword #nav a,
#wc_lostcompletion #memberpages p a,
#wc_lostcompletion .send a,
.member-page #memberinfo .send input.deletemember {

class追加 : usces_cart.css 48行目~62行目あたり

.cart-page input[type=button]:hover,
.cart-page input[type=submit]:hover,
.cart-page input[type=reset]:hover,
.member-page input[type=button]:hover,
.member-page input[type=submit]:hover,
.member-page input[type=reset]:hover,
.member_submenu a.usces_logout_a:hover,
.gotoedit a:hover,
.gotoedit a:hover,

.member-page #memberinfo .send input.top:hover,
#wc_ordercompletion .send a:hover,
#wc_lostmemberpassword #nav a:hover,
#wc_lostcompletion #memberpages p a:hover,
#wc_lostcompletion .send a:hover,
.member-page #memberinfo .send input.deletemember:hover {
.cart-page input[type=button]:hover,
.cart-page input[type=submit]:hover,
.cart-page input[type=reset]:hover,
.member-page input[type=button]:hover,
.member-page input[type=submit]:hover,
.member-page input[type=reset]:hover,
.member_submenu a.usces_logout_a:hover,
.gotoedit a:hover,
.gotoedit a:hover,
.member-page #memberedit .send input.top:hover,
.member-page #memberinfo .send input.top:hover,
#wc_ordercompletion .send a:hover,
#wc_lostmemberpassword #nav a:hover,
#wc_lostcompletion #memberpages p a:hover,
#wc_lostcompletion .send a:hover,
.member-page #memberinfo .send input.deletemember:hover {

class追加 : usces_cart.css 70行目~83行目あたり

.send input.to_customerinfo_button,
.send input.to_memberlogin_button,
.send input.to_deliveryinfo_button,
.send input.to_confirm_button,
.send input#purchase_button,
#wc_customer .send input.to_reganddeliveryinfo_button,
#wc_login .loginbox #member_login,
#wc_member .loginbox #member_login,
#wc_lostmemberpassword #member_login,
.member-page .send input,
#wc_login .loginbox .new-entry #nav a,
#wc_member .loginbox .new-entry #nav a,
#wc_lostmemberpassword #member_login,
#wc_member_update_settlement .send input[type="submit"] {
.send input.to_customerinfo_button,
.send input.to_memberlogin_button,
.send input.to_deliveryinfo_button,
.send input.to_confirm_button,
.send input#purchase_button,
#wc_customer .send input.to_reganddeliveryinfo_button,
#wc_login .loginbox #member_login,
#wc_member .loginbox #member_login,
#wc_lostmemberpassword #member_login,
.member-page .send input,
#wc_login .loginbox .new-entry #nav a,
#wc_member .loginbox .new-entry #nav a,
#wc_lostmemberpassword #member_login,
#wc_member_update_settlement .send input.card-update,
#wc_member_update_settlement .send input.card-register {

class追加 : usces_cart.css 97行目~110行目あたり

.send input.to_customerinfo_button:hover,
.send input.to_memberlogin_button:hover,
.send input.to_deliveryinfo_button:hover,
.send input.to_confirm_button:hover,
.send input#purchase_button:hover,
#wc_customer .send input.to_reganddeliveryinfo_button:hover,
#wc_login .loginbox #member_login:hover,
#wc_member .loginbox #member_login:hover,
#wc_lostmemberpassword #member_login:hover,
.member-page .send input:hover,
#wc_login .loginbox .new-entry #nav a:hover,
#wc_member .loginbox .new-entry #nav a:hover,
#wc_lostmemberpassword #member_login:hover,
#wc_member_update_settlement .send input[type="submit"]:hover {
.send input.to_customerinfo_button:hover,
.send input.to_memberlogin_button:hover,
.send input.to_deliveryinfo_button:hover,
.send input.to_confirm_button:hover,
.send input#purchase_button:hover,
#wc_customer .send input.to_reganddeliveryinfo_button:hover,
#wc_login .loginbox #member_login:hover,
#wc_member .loginbox #member_login:hover,
#wc_lostmemberpassword #member_login:hover,
.member-page .send input:hover,
#wc_login .loginbox .new-entry #nav a:hover,
#wc_member .loginbox .new-entry #nav a:hover,
#wc_lostmemberpassword #member_login:hover,
#wc_member_update_settlement .send input.card-update:hover,
#wc_member_update_settlement .send input.card-register:hover {

CSS修正 : usces_cart.css 131行目~133行目あたり

#point_table td input.use_point_button,
#cart #coupon_table td .use_coupon_button,
.member_submenu a {
.member-page #memberinfo .gotoedit a,
#point_table td input.use_point_button,
#cart #coupon_table td .use_coupon_button,
.member_submenu a {

class追加 : usces_cart.css 150行目~159行目あたり

#wc_cart #cart .upbutton input:hover,
#point_table td input.use_point_button:hover,
#cart #coupon_table td .use_coupon_button:hover,
.member_submenu a:hover {
.member-page #memberinfo .gotoedit a:hover,
#wc_cart #cart .upbutton input:hover,
#point_table td input.use_point_button:hover,
#cart #coupon_table td .use_coupon_button:hover,
.member_submenu a:hover {

スマホでクレカ登録ページのレイアウト調整

CSS追加 : usces_cart.css

#wc_member_update_settlement {
    padding: 0 10px;
}
@media screen and (min-width: 38.75em) {
    /* =wc_member_update_settlement
    -------------------------------------------------------------- */
    #wc_member_update_settlement {
        padding: 0;
    }
}