Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
One-line patch to add a drupal_alter in uc_country_select, to allow to dynamically restrict the list of available countries. I need this for a multi-domain shop so that I can alter the available countries per domain. Could also be used to restrict available countries based on user profiles or any other dynamic factor.
Without the patch, I'd have to alter all forms that contain a ubercart country selection, which is quite error-prone IMO.
Comment | File | Size | Author |
---|---|---|---|
ubercart_allow_country_list_alter.patch | 564 bytes | Frando | |
Comments
Comment #1
longwaveThis seems like a useful feature, and although we are not really accepting new features in 6.x-2.x at this stage, I guess this one-liner can't hurt and can also easily be ported to 7.x-3.x.
However, this hook should be added to the relevant documentation file, so people can discover how to use it without digging through the code.
Comment #2
TR CreditAttribution: TR commentedNew features will go into 8.x-4.x first, then be backported if needed.
Comment #3
TR CreditAttribution: TR commentedThis is implemented in 8.x-4.x. I'm not planning on backporting this to D7.