Show product custom meta on WooCommerce thank you page

Question

I’m trying to display the product meta on order received page still no success. i did it with cart page with this code

add_action( 'woocommerce_review_order_before_payment', 'project_information_table', 20 );

function project_information_table() {
    foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
            $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    }
    $finance_amount = $_product->get_meta('_finance_amount');
echo $finance_amount;

same code didn’t work while changing woocommerce_review_order_before_payment to woocommerce_thankyou

0
Mohamed Mostafa 8 months 2020-11-26T04:10:21-05:00 0 Answers 11 views 0

Leave an answer

Browse
Browse