Skip to main content

fc_shipping_method_option_image_markup

Type: Filter

Filters the HTML for the shipping method option image.

Signature​

apply_filters( 'fc_shipping_method_option_image_markup', $html, $method, $method_image_html );

Parameters​

NameTypeDescription
$htmlstringHTML markup.
$method\WC_Shipping_RateMethod.
$method_image_htmlstringMethod image html.

Since​

  • 3.1.9

Source: inc/checkout-steps.php

Examples​

add_filter( 'fc_shipping_method_option_image_markup',
/**
* Customize shipping method image wrapper adding custom class.
*
* @param string $html HTML markup.
* @param \WC_Shipping_Rate $method Method.
* @param string $method_image_html Method image html.
* @return string Filtered value.
*/
function( $html, $method, $method_image_html ) {
return '<span class="custom-class shipping-method__option-image">%s</span>';
},
10,
3
);