Last active
October 10, 2020 21:55
-
-
Save bolderelements/4124d78c01d382f0d89a45e1d81a0cda to your computer and use it in GitHub Desktop.
Display the custom column data on the cart and checkout pages
This file contains hidden or 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
/** | |
* Display provider if applicable. | |
* | |
* @return void | |
*/ | |
function betrs_display_provider( $method, $index ) { | |
$meta_data = $method->get_meta_data(); | |
if( isset( $meta_data['provider'] ) ) { | |
echo '<p class="betrs_option_provider">Shipping Provider: ' . stripslashes( sanitize_text_field( $meta_data['provider'] ) ) . '</div>'; | |
} | |
} | |
add_action( 'woocommerce_after_shipping_rate', 'betrs_display_provider', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment