Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions drupal-org.make
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ projects[bat_event_state_constraints][download][url] = https://github.com/Roomif
projects[bat_event_state_constraints][download][tag] = 1.2
projects[bat_event_state_constraints][subdir] = bat

projects[commerce_stripe_connect_field][type] = module
projects[commerce_stripe_connect_field][download][type] = git
projects[commerce_stripe_connect_field][download][url] = https://github.com/Roomify/commerce_stripe_connect_field
projects[commerce_stripe_connect_field][download][branch] = 7.x-3.x

projects[roomify_rate][type] = module
projects[roomify_rate][download][type] = git
projects[roomify_rate][download][url] = https://github.com/Roomify/roomify_rate.git
Expand Down
25 changes: 25 additions & 0 deletions modules/roomify/roomify_system/roomify_system.fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ function roomify_system_add_user_fields() {
);
}

if (field_read_field('user_stripe_connect') === FALSE) {
$field_bases['user_stripe_connect'] = array(
'field_name' => 'user_stripe_connect',
'type' => 'commerce_stripe_connect_field',
'cardinality' => 1,
'locked' => 1,
'settings' => array(),
);
}

foreach ($field_bases as $field) {
field_create_field($field);
}
Expand Down Expand Up @@ -252,6 +262,21 @@ function roomify_system_add_user_fields() {
);
}

if (field_read_instance('user', 'user_stripe_connect', 'user') === FALSE) {
$field_instances['user-user-user_stripe_connect'] = array(
'field_name' => 'user_stripe_connect',
'entity_type' => 'user',
'label' => 'Stripe Connect',
'bundle' => 'user',
'required' => FALSE,
'widget' => array(
'type' => 'commerce_stripe_connect_field',
'settings' => array(),
),
'settings' => array(),
);
}

foreach ($field_instances as $instance) {
field_create_instance($instance);
}
Expand Down
16 changes: 16 additions & 0 deletions modules/roomify/roomify_system/roomify_system.install
Original file line number Diff line number Diff line change
Expand Up @@ -996,3 +996,19 @@ function roomify_system_update_7062() {
function roomify_system_update_7063() {
module_enable(array('xmlsitemap_menu'));
}

/**
* Enable module "Commerce Stripe Connect Field".
*/
function roomify_system_update_7064() {
module_enable(array('commerce_stripe_connect_field'));
}

/**
* Add Stripe Connect field.
*/
function roomify_system_update_7065() {
module_load_include('inc', 'roomify_system', 'roomify_system.fields');

roomify_system_add_user_fields();
}
1 change: 1 addition & 0 deletions roomify.info
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ dependencies[] = entity_edit_protection
dependencies[] = google_recaptcha
dependencies[] = hreflang
dependencies[] = select2
dependencies[] = commerce_stripe_connect_field
dependencies[] = yoast_seo
dependencies[] = video

Expand Down