| @@ -7,8 +7,10 @@ | ||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | namespace Forge12\DoubleOptIn\FormSettings; |
| 10 | 10 | |
| 11 | +use Forge12\DoubleOptIn\Setup\FormDefaults; | |
| 12 | + | |
| 11 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | 14 | exit; |
| 13 | 15 | } |
| 14 | 16 | |
| @@ -272,10 +274,12 @@ | ||
| 272 | 274 | * |
| 273 | 275 | * @return self |
| 274 | 276 | */ |
| 275 | 277 | public static function createDefault(): self { |
| 276 | - $dto = new self(); | |
| 277 | - $dto->sender = get_bloginfo( 'admin_email' ); | |
| 278 | + $dto = new self(); | |
| 279 | + | |
| 280 | + // Sender defaults from the setup wizard, if it ran. | |
| 281 | + list( $dto->sender, $dto->senderName ) = FormDefaults::forNewForm( (string) get_bloginfo( 'admin_email' ), '' ); | |
| 278 | 282 | return $dto; |
| 279 | 283 | } |
| 280 | 284 | |
| 281 | 285 | /** |