This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Cat Slider mono96 | |
Description: 同じカテゴリー記事のカルーセルスライダー [cat_slider] | |
Version: 1.0 | |
*/ | |
/* 参考 https://byacco.work/wordpress-post-slider-no_plugin/ */ | |
if ( ! defined( 'ABSPATH' ) ) exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for($i = 0; $i <= $setting['reception-period']; $i++){ | |
$set_display_date = $delivery_start_day->format('Y-m-d h:i:s'); | |
$value_date[$i] = get_date_from_gmt($set_display_date, 'Y-m-d'); | |
$display_date[$i] = get_date_from_gmt($set_display_date, __('Y/m/d', 'woocommerce-for-japan' )); | |
if($setting['day-of-week']){ | |
$week_name = $week[$delivery_start_day->format("w")]; | |
$display_date[$i] = $display_date[$i].sprintf(__( '(%s)', 'woocommerce-for-japan' ), $week_name); | |
} | |
//Begin 追加コード 194行目 echo '<option value="'.$value_date[$i].'">'.$display_date[$i].'</option>'; を差し替える |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//2ページ目以降にnoindex付与 | |
add_filter( 'wp_robots', function( $robots ) { | |
if ( is_paged() ) { | |
$robots['noindex'] = true; | |
} | |
return $robots; | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* youtube 埋め込み アスペクト比保持 for snow monkey */ | |
.embed-youtube { | |
display:block; | |
position: relative; | |
width:100%; | |
height:0; | |
padding-top: 56.25%; | |
} | |
.embed-youtube iframe{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* キャンセル 顧客にメール送信 */ | |
add_action('woocommerce_order_status_changed', 'send_custom_email_notifications', 10, 4 ); | |
function send_custom_email_notifications( $order_id, $old_status, $new_status, $order ){ | |
if ( $new_status == 'cancelled' || $new_status == 'failed' ){ | |
$wc_emails = WC()->mailer()->get_emails(); // Get all WC_emails objects instances | |
$customer_email = $order->get_billing_email(); // The customer email | |
} | |
if ( $new_status == 'cancelled' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To change add to cart text on single product page | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); | |
function woocommerce_custom_single_add_to_cart_text() { | |
return __( 'カートに入れる', 'woocommerce' ); | |
} | |
// To change add to cart text on product archives(Collection) page | |
add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' ); | |
function woocommerce_custom_product_add_to_cart_text() { | |
return __( 'カートに入れる', 'woocommerce' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Woocommerce 虫眼鏡なし */ | |
add_action( 'after_setup_theme', 'bc_remove_magnifier', 100 ); | |
function bc_remove_magnifier() { | |
remove_theme_support( 'wc-product-gallery-zoom' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 追跡会社カスタマイズ for Japanized for WooCommerce Pro */ | |
function my_carrier_tracking_data(){ | |
$my_carrier_tracking_url_data = array( | |
'seino' => array( | |
'title' => __( '西濃運輸', 'jp4wc-pro' ), | |
'url' => 'https://track.seino.co.jp/kamotsu/GempyoNoShokai.do', | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_carrier_tracking_fields(){ | |
$tracking_fields = array( | |
'jp4wc-delivery-company' => array( | |
'type' => 'select', | |
'id' => 'jp4wc_delivery_company', | |
'label' => __('Delivery Company', 'jp4wc-pro'), | |
'description' => __('<br />Please select a shipping company.', 'jp4wc-pro'), | |
'class' => 'jp4wc-delivery-company', | |
'options' => array( | |
'hoge' => __( 'hoge', 'jp4wc-pro' ), |
NewerOlder