$args[ 'id' ] ) ); echo $args['after_widget']; } public function update( $new_instance, $old_instance ) { if ( ! $new_instance ) { $new_instance = array( 'id' => $_POST['sidebar'], 'settings' => WCML_Currency_Switcher::get_settings( $_POST['sidebar'] ) ); } return $new_instance; } function form( $instance ) { if ( ! isset( $instance[ 'id' ] ) ) { $instance[ 'id' ] = ''; } $url_to_currency_switcher = esc_url( admin_url( 'admin.php?page=wpml-wcml&tab=multi-currency#currency-switcher/' . (int) $instance[ 'id' ] ) ); $button_text = esc_html__( 'Customize the currency switcher', 'woocommerce-multilingual' ); printf('

%s

', $url_to_currency_switcher, $button_text ); } }