[WORDPRESS] Woocommerce 카트 및 체크 아웃의 운송 옵션에 사용자 정의 아이콘을 추가
WORDPRESSWoocommerce 카트 및 체크 아웃의 운송 옵션에 사용자 정의 아이콘을 추가
해결법
-
1.woocommerce_cart_shipping_method_full_label 필터를 사용합니다.
woocommerce_cart_shipping_method_full_label 필터를 사용합니다.
add_filter( 'woocommerce_cart_shipping_method_full_label', 'filter_woocommerce_cart_shipping_method_full_label', 10, 2 ); function filter_woocommerce_cart_shipping_method_full_label( $label, $method ) { // Use the condition here with $method to apply the image to a specific method. if( $method->method_id == "flat_rate" ) { $label = $label."Your Icon Image"; } else if( $method->method_id == "local_pickup" ) { $label = $label."Your Icon Image"; } return $label; }
from https://stackoverflow.com/questions/58225336/adding-custom-icons-to-the-shipping-options-in-woocommerce-cart-and-checkout by cc-by-sa and MIT license
'WORDPRESS' 카테고리의 다른 글
[WORDPRESS] 워드 프레스 wp_remote_post (0) | 2020.11.17 |
---|---|
[WORDPRESS] 모든 변형을 Woocommerce에서 변수 제품의 가격을 업데이트 (0) | 2020.11.17 |
[WORDPRESS] 어떻게 PHP와 XML-RPC metaWeblog.newPost를 제대로 사용 하는가? (0) | 2020.11.17 |
[WORDPRESS] 나는 하나의 제품 요약 후 WooCommerce에 HTML 코드를 추가 할 수있는 방법 (0) | 2020.11.17 |
[WORDPRESS] 클릭에 대한 자세한 게시물 워드 프레스를로드 [마감] (0) | 2020.11.17 |