wordpress - wooCommerce call function in checkout page -
i have function in themes functions.php file displays info product. on checkout page below billing address want out set info there.
here function in themes functions.php
function wc_checkout_description_so_1( $other_data, $cart_item ) { $post_data = get_post( $cart_item['product_id'] ); echo '<div>html output here</div>'; }
i have tried utilize add_filter below billing address doesnt not work:
add_filter( 'woocommerce_before_checkout_shipping_form', 'wc_checkout_description_so_1', 10, 2 );
all need output below shipping info , above think should work?
thanks
j
woocommerce_after_checkout_shipping_form
might more appropriate displaying after shipping address. either way, variable passed woocommerce_after_checkout_shipping_form
hook $checkout
variable. can var_dump
variable see available.
add_action( 'woocommerce_after_checkout_shipping_form', 'wc_checkout_description_so_1' ); function wc_checkout_description_so_1( $checkout ) { var_dump( $checkout ); }
wordpress woocommerce
No comments:
Post a Comment