// Show Shipping Class Shortcode
function shipping_banner() {
$product = wc_get_product();
$shipping_class = $product->get_shipping_class();
switch ( $shipping_class ) {
case 'kostenloser-versand': // Shipping Class Slug
echo 'Some Taxes <div class="free-shipping">Yay.. Free Shipping!</div>'; // Desired Content For This SC
break;
default: // Means Fallback
echo 'Some Taxes <a href="http://example.com/shipping/">Plus Shipping</a>'; // Fallback Content
}
}
add_shortcode( 'shippingclass', 'shipping_banner', 20 );
- +49 561 9963 9601
- hello@eboosting.net
- Resources
Fachbeitrag: Neuromarketing und Conversions