How to distinguish pages created by woocommerce?

You can use conditional tags or function wc_get_page_id(‘page_name’), where page_name can be: ‘myaccount‘, ‘shop‘, ‘cart‘, ‘checkout‘, etc. For example: Using is_cart() you can check whether the current page is a cart page. Using wc_get_page_id( ‘cart’ ); you will receive ID of cart page. Which way is more suitable for your code you have to decide … Read more

Pre-populated WooCommerce checkout fields: dropdown fields issue

Found my own solution. The key was to use a different callback and reference woocommerces actual field name. Have simplified the code below down to the essence. function mmd_list_claimlisting($DBRecordId) { global $woocommerce; $Record = mmd_list_GetDBRecord($DBRecordId); $woocommerce->session->set(‘claim_state’, $Record[‘BusinessState’]); $woocommerce->session->set(‘claim_country’, $Record[‘BusinessCountry’]); // No matching variation found } //////////////////////////////////////////////////////////////////// // Pre-fill out the check out fields with the … Read more