Show notice when pages don't exist, and set gateway defaults
This commit is contained in:
parent
b8dc089040
commit
54fa1e34d3
|
@ -107,6 +107,10 @@ class WC_Install {
|
||||||
WC_Admin_Notices::add_notice( 'install' );
|
WC_Admin_Notices::add_notice( 'install' );
|
||||||
set_transient( '_wc_activation_redirect', 1, 30 );
|
set_transient( '_wc_activation_redirect', 1, 30 );
|
||||||
|
|
||||||
|
// No page? Let user run wizard again..
|
||||||
|
} elseif ( empty( get_option( 'woocommerce_cart_page_id' ) ) ) {
|
||||||
|
WC_Admin_Notices::add_notice( 'install' );
|
||||||
|
|
||||||
// Show welcome screen for major updates only
|
// Show welcome screen for major updates only
|
||||||
} elseif ( version_compare( $current_wc_version, $major_wc_version, '<' ) ) {
|
} elseif ( version_compare( $current_wc_version, $major_wc_version, '<' ) ) {
|
||||||
set_transient( '_wc_activation_redirect', 1, 30 );
|
set_transient( '_wc_activation_redirect', 1, 30 );
|
||||||
|
|
|
@ -74,7 +74,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
|
||||||
'title' => __( 'Enable/Disable', 'woocommerce' ),
|
'title' => __( 'Enable/Disable', 'woocommerce' ),
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'label' => __( 'Enable Bank Transfer', 'woocommerce' ),
|
'label' => __( 'Enable Bank Transfer', 'woocommerce' ),
|
||||||
'default' => 'yes'
|
'default' => 'no'
|
||||||
),
|
),
|
||||||
'title' => array(
|
'title' => array(
|
||||||
'title' => __( 'Title', 'woocommerce' ),
|
'title' => __( 'Title', 'woocommerce' ),
|
||||||
|
|
|
@ -32,7 +32,7 @@ return array(
|
||||||
'title' => __( 'PayPal Email', 'woocommerce' ),
|
'title' => __( 'PayPal Email', 'woocommerce' ),
|
||||||
'type' => 'email',
|
'type' => 'email',
|
||||||
'description' => __( 'Please enter your PayPal email address; this is needed in order to take payment.', 'woocommerce' ),
|
'description' => __( 'Please enter your PayPal email address; this is needed in order to take payment.', 'woocommerce' ),
|
||||||
'default' => '',
|
'default' => get_option( 'admin_email' ),
|
||||||
'desc_tip' => true,
|
'desc_tip' => true,
|
||||||
'placeholder' => 'you@youremail.com'
|
'placeholder' => 'you@youremail.com'
|
||||||
),
|
),
|
||||||
|
|
|
@ -42,7 +42,7 @@ if ( ! empty( $status_options['uninstall_data'] ) ) {
|
||||||
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "woocommerce_tax_rate_locations" );
|
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "woocommerce_tax_rate_locations" );
|
||||||
|
|
||||||
// Delete options
|
// Delete options
|
||||||
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'woocommerce_%';");
|
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'woocommerce\_%';");
|
||||||
|
|
||||||
// Delete posts + data
|
// Delete posts + data
|
||||||
$wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'product', 'product_variation', 'shop_coupon', 'shop_order', 'shop_order_refund' );" );
|
$wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'product', 'product_variation', 'shop_coupon', 'shop_order', 'shop_order_refund' );" );
|
||||||
|
|
Loading…
Reference in New Issue