Skip to content

Instantly share code, notes, and snippets.

@muskie9
Created February 23, 2015 21:34
Show Gist options
  • Save muskie9/902f06488b28b9447073 to your computer and use it in GitHub Desktop.
Save muskie9/902f06488b28b9447073 to your computer and use it in GitHub Desktop.
<?php
public function onBeforeWrite(){
parent::onBeforeWrite();
$siteConfig = SiteConfig::current_site_config();
if(!$siteConfig->StoreKey){
$key = FoxyCart::setStoreKey();
+ while(!ctype_alnum($key)){
+ $key = FoxyCart::setStoreKey();
+ }
+ $siteConfig->StoreKey = $key;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment