Paypal fix, and Signup/login can be turned off for checkout. Closes #125.
This commit is contained in:
parent
2028ad9742
commit
297ffd7af0
|
@ -51,35 +51,45 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
|
|||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'Guest checkout', 'woothemes' ),
|
||||
'name' => __( 'Checkout', 'woothemes' ),
|
||||
'desc' => __( 'Allow users to checkout without signing up for an account', 'woothemes' ),
|
||||
'id' => 'woocommerce_enable_guest_checkout',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start'
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'Force SSL/HTTPS', 'woothemes' ),
|
||||
'desc' => __( 'Force the checkout/pay pages to be sent over https for added security (An SSL Certificate is required)', 'woothemes' ),
|
||||
'desc' => __( 'Allow users to create an account and login from the checkout page', 'woothemes' ),
|
||||
'id' => 'woocommerce_enable_signup_and_login_from_checkout',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => ''
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Force <abbr title="Secure Sockets Layer, a computing protocol that ensures the security of data sent via the Internet by using encryption">SSL</abbr>/HTTPS (an SSL Certificate is required)', 'woothemes' ),
|
||||
'id' => 'woocommerce_force_ssl_checkout',
|
||||
'std' => 'no',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end'
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'WooCommerce CSS', 'woothemes' ),
|
||||
'desc' => __( 'Enable WooCommerce frontend CSS styles', 'woothemes' ),
|
||||
'name' => __( 'Shop Styling', 'woothemes' ),
|
||||
'desc' => __( 'Enable WooCommerce CSS styles', 'woothemes' ),
|
||||
'id' => 'woocommerce_frontend_css',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start'
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'Product image lightbox', 'woothemes' ),
|
||||
'desc' => __( 'Enable WooCommerce lightbox?', 'woothemes' ),
|
||||
'desc' => __( 'Enable WooCommerce lightbox on the product page', 'woothemes' ),
|
||||
'id' => 'woocommerce_enable_lightbox',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end'
|
||||
),
|
||||
|
||||
array(
|
||||
|
@ -567,23 +577,25 @@ $woocommerce_settings['shipping'] = apply_filters('woocommerce_shipping_settings
|
|||
array( 'name' => __( 'Shipping Options', 'woothemes' ), 'type' => 'title','desc' => '', 'id' => 'shipping_options' ),
|
||||
|
||||
array(
|
||||
'name' => __( 'Calculate shipping', 'woothemes' ),
|
||||
'desc' => __( 'Enable shipping/shipping calculations', 'woothemes' ),
|
||||
'name' => __( 'Shipping calculations', 'woothemes' ),
|
||||
'desc' => __( 'Enable shipping', 'woothemes' ),
|
||||
'id' => 'woocommerce_calc_shipping',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start'
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'Shipping calculator', 'woothemes' ),
|
||||
'name' => __( 'Shipping calculations', 'woothemes' ),
|
||||
'desc' => __( 'Enable the shipping calculator on the cart page', 'woothemes' ),
|
||||
'id' => 'woocommerce_enable_shipping_calc',
|
||||
'std' => 'yes',
|
||||
'type' => 'checkbox'
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end'
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => __( 'Ship to billing', 'woothemes' ),
|
||||
'name' => __( 'Shipping destination', 'woothemes' ),
|
||||
'desc' => __( 'Only ship to the users billing address', 'woothemes' ),
|
||||
'id' => 'woocommerce_ship_to_billing_address_only',
|
||||
'std' => 'no',
|
||||
|
|
|
@ -176,7 +176,7 @@ class woocommerce_checkout {
|
|||
do_action('woocommerce_after_checkout_billing_form', $this);
|
||||
|
||||
// Registration Form Fields
|
||||
if (!is_user_logged_in()) :
|
||||
if (!is_user_logged_in() && get_option('woocommerce_enable_signup_and_login_from_checkout')=="yes") :
|
||||
|
||||
if (get_option('woocommerce_enable_guest_checkout')=='yes') :
|
||||
|
||||
|
|
|
@ -290,7 +290,10 @@ class woocommerce_paypal extends woocommerce_payment_gateway {
|
|||
$_POST['cmd'] = '_notify-validate';
|
||||
|
||||
// Send back post vars to paypal
|
||||
$params = array( 'body' => $_POST );
|
||||
$params = array(
|
||||
'body' => $_POST,
|
||||
'sslverify' => false
|
||||
);
|
||||
|
||||
// Get url
|
||||
if ( $this->testmode == 'yes' ):
|
||||
|
|
|
@ -82,6 +82,11 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 1.2.1 =
|
||||
* Signup/login can be turned off for checkout
|
||||
* Paypal remote post now has 'sslverify' => false to prevent errors with CURL
|
||||
* Minor admin settings tidyup
|
||||
|
||||
= 1.2 - 03/11/2011 =
|
||||
* Added quick status change buttons (processing/complete) to orders panel
|
||||
* Ability to preview email templates
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
global $woocommerce;
|
||||
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout
|
||||
if (get_option('woocommerce_enable_signup_and_login_from_checkout')=="no" && get_option('woocommerce_enable_guest_checkout')=="no" && !is_user_logged_in()) :
|
||||
echo apply_filters('woocommerce_checkout_must_be_logged_in_message', __('You must be logged in to checkout.', 'woothemes'));
|
||||
return;
|
||||
endif;
|
||||
|
||||
// filter hook for include new pages inside the payment method
|
||||
$get_checkout_url = apply_filters( 'woocommerce_get_checkout_url', $woocommerce->cart->get_checkout_url() ); ?>
|
||||
|
||||
|
|
|
@ -807,7 +807,11 @@ if (!function_exists('woocommerce_checkout_login_form')) {
|
|||
|
||||
if (is_user_logged_in()) return;
|
||||
|
||||
?><p class="info"><?php _e('Already registered?', 'woothemes'); ?> <a href="#" class="showlogin"><?php _e('Click here to login', 'woothemes'); ?></a></p><?php
|
||||
if (get_option('woocommerce_enable_signup_and_login_from_checkout')=="no") return;
|
||||
|
||||
$info_message = apply_filters('woocommerce_checkout_login_message', __('Already registered?', 'woothemes'));
|
||||
|
||||
?><p class="info"><?php echo $info_message; ?> <a href="#" class="showlogin"><?php _e('Click here to login', 'woothemes'); ?></a></p><?php
|
||||
|
||||
woocommerce_login_form( __('If you have shopped with us before, please enter your username and password in the boxes below. If you are a new customer please proceed to the Billing & Shipping section.', 'woothemes') );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue