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.

CommentFileSizeAuthor
ubercart_allow_country_list_alter.patch564 bytesFrando
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Category: Task » Feature request
Status: Needs review » Needs work

This 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.

TR’s picture

Version: 6.x-2.x-dev » 8.x-4.x-dev

New features will go into 8.x-4.x first, then be backported if needed.

TR’s picture

Status: Needs work » Fixed

This is implemented in 8.x-4.x. I'm not planning on backporting this to D7.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.