Wholesale Market, By CedCommerce
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_filter( "wpo_prepare_item", function ( $item, $product ) { $item['item_cost'] = $product->get_price(); return $item; }, 10, 2 ); add_filter( "wpo_update_cart_loaded_product", function ( $loaded_product, $item ) { $loaded_product['item_cost'] = $item['data']->get_price(); $loaded_product['readonly_price'] = $item['data']->get_price(); return $loaded_product; }, 10, 2 ); add_filter( 'wpo_cart_item_is_price_readonly', "__return_true", 10, 0 ); |