javascript - How to create a custom pick up and delivery option in woocommerce cart page -


i have shopping cart setup on website using woocommerce , set want achive there create custom radio buttons select option delivery/pickup. if user select pickup option no shipping charged or if user select delivery option $12.00 flat rate/order charged along timings save meta key , value later on creating order. following image elaborate enter image description here

to achieve had created custom plugin stuck add shipping amount. question asked here: can't update shipping amount while checkout in woocommerce(wordpress)

but didn't response. appritiated.

correct answer posted here can't update shipping amount while checkout in woocommerce(wordpress)

using following hook

function woo_add_cart_fee() {  wc()->cart->add_fee('shipping ', wc()->session->get('ship_val')); } add_action('woocommerce_cart_calculate_fees', 'woo_add_cart_fee'); 

and date can inserted adding custom field on cart page using add_meta_box()


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -