Using the same class across multiple functions

I found a solution to this. In my other project I use this function in my settings class: public function lal_get_settings( $index = false ) { $defaults = array ( ‘lal_display_type’ => ‘icon’, ‘lal_add_fa’ => false); $settings = get_option( ‘lal_settingz’, $defaults ); if ( $index && isset( $settings[ $index ] ) ) { return $settings[ … 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