function wpsc_google_checkout_page() { global $wpsc_gateway; $script = "<script type='text/javascript'>\n\t \t\t\t\tjQuery(document).ready(\n \t\t\t\t\t\tfunction()\n \t\t\t\t\t\t {\n\t \t\t\t\t\t\tjQuery('div#wpsc_shopping_cart_container h2').hide();\n\t \t\t\t\t\t\tjQuery('div#wpsc_shopping_cart_container .wpsc_cart_shipping').hide();\n \t\t\t\t\t\t\tjQuery('.wpsc_checkout_forms').hide();\n\t \t\t\t\t\t});\n\t \t\t\t</script>"; $options = get_option('payment_gateway'); // exit('HELLO<pre>'.print_r(get_option('custom_gateway_options'), true).'</pre>'); //foreach((array)get_option('custom_gateway_options') as $gateway){ if (in_array('google', (array) get_option('custom_gateway_options'))) { $options = 'google'; } // } if ($options == 'google' && isset($_SESSION['gateway'])) { unset($_SESSION['gateway']); echo $script; gateway_google(true); } }
function wpsc_google_checkout_page() { global $wpsc_gateway; $script = "<script type='text/javascript'>\n\t \t\t\t\tjQuery(document).ready(\n \t\t\t\t\t\tfunction()\n \t\t\t\t\t\t {\n\t \t\t\t\t\t\tjQuery('div#wpsc_shopping_cart_container h2').hide();\n\t \t\t\t\t\t\tjQuery('div#wpsc_shopping_cart_container .wpsc_cart_shipping').hide();\n \t\t\t\t\t\t\tjQuery('.wpsc_checkout_forms').hide();\n\t \t\t\t\t\t});\n\t \t\t\t</script>"; $options = get_option('payment_gateway'); if (in_array('google', (array) get_option('custom_gateway_options')) && 'google' == wpsc_get_customer_meta('google_checkout')) { wpsc_delete_customer_meta('google_checkout'); echo $script; gateway_google(true); } }