Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/includes/updates/upgrade_1.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
function pmpro_upgrade_1()
3
+
{
4
+
/*
5
+
default options
6
+
*/
7
+
$gateway_environment = "sandbox";
8
+
update_option("pmpro_gateway_environment", $gateway_environment);
9
+
10
+
$pmpro_currency = "USD";
11
+
update_option("pmpro_currency", $pmpro_currency);
12
+
13
+
$pmpro_accepted_credit_cards = "Visa,Mastercard,American Express,Discover";
14
+
update_option("pmpro_accepted_credit_cards", $pmpro_accepted_credit_cards);
15
+
16
+
$parsed = parse_url( home_url() );
17
+
$hostname = $parsed['host'];
18
+
$host_parts = explode( ".", $hostname );
19
+
if ( count( $host_parts ) > 1 ) {
20
+
$email_domain = $host_parts[count($host_parts) - 2] . "." . $host_parts[count($host_parts) - 1];
21
+
} else {
22
+
$email_domain = $parsed['host'];
23
+
}
24
+
25
+
$from_email = "wordpress@" . $email_domain;
26
+
update_option("pmpro_from_email", $from_email);
27
+
28
+
$from_name = "WordPress";
29
+
update_option("pmpro_from_name", $from_name);
30
+
31
+
//setting new email settings defaults
32
+
update_option("pmpro_email_admin_checkout", "1");
33
+
update_option("pmpro_email_admin_changes", "1");
34
+
update_option("pmpro_email_admin_cancels", "1");
35
+
update_option("pmpro_email_admin_billing", "1");
36
+
update_option("pmpro_tospage", "");
37
+
38
+
//don't want these pointers to show on new installs
39
+
update_option( 'pmpro_dismissed_wp_pointers', array( 'pmpro_v2_menu_moved' ) );
40
+
41
+
//let's pause the nag for the first week of use
42
+
$pmpro_nag_paused = current_time('timestamp')+(3600*24*7);
43
+
update_option('pmpro_nag_paused', $pmpro_nag_paused, 'no');
44
+
45
+
//wisdom tracking turned on by default
46
+
update_option('pmpro_wisdom_opt_out', 0);
47
+
48
+
//db update
49
+
pmpro_db_delta();
50
+
51
+
//update version and return
52
+
pmpro_setOption("db_version", "1.71"); //no need to run other updates
53
+
return 1.71;
54
+
}
55
+