payment_gateways->available_payment_gateway_lists(); if($available_gateways): $secure_checkout_method = false; $checkout_page = false; foreach ($available_gateways as $gateway ) : if($gateway->id == 'SecureCheckout') : $secure_checkout_method = true; endif; if( $gateway->id == 'paypal' || $gateway->id == 'GoogleCheckout'): $checkout_page = true; endif; endforeach; endif; if(!is_apptivo_user_logged_in()) : $logout_pageid = get_option('apptivo_ecommerce_logout_page_id '); $account_pageid = get_option('apptivo_ecommerce_myaccount_page_id '); $args[exclude] = $logout_pageid.','.$changepwd_pageid.','.$account_pageid; else : $regisdter_pageid = get_option('apptivo_ecommerce_register_page_id '); $login_pageid = get_option('apptivo_ecommerce_login_page_id '); $args[exclude] = $regisdter_pageid.','.$login_pageid; endif; $args[exclude] = get_option('apptivo_ecommerce_thanks_page_id'); $args[exclude] = get_option('apptivo_ecommerce_print_receipt_page_id'); //Secure Checkout Page if(!$secure_checkout_method): $args[exclude] = get_option('apptivo_ecommerce_secure_checkout_page_id'); endif; //Checkout Page if(!$checkout_page): $args[exclude] = get_option('apptivo_ecommerce_checkout_page_id'); endif; return $args; } function filter_wp_list_pages($exclude){ global $apptivo_ecommerce; $available_gateways = $apptivo_ecommerce->payment_gateways->available_payment_gateway_lists(); if($available_gateways): $secure_checkout_method = false; $checkout_page = false; foreach ($available_gateways as $gateway ) : if($gateway->id == 'SecureCheckout') : $secure_checkout_method = true; endif; if( $gateway->id == 'paypal' || $gateway->id == 'GoogleCheckout'): $checkout_page = true; endif; endforeach; endif; if(!is_apptivo_user_logged_in()) : $logout_pageid = get_option('apptivo_ecommerce_logout_page_id '); $account_pageid = get_option('apptivo_ecommerce_myaccount_page_id '); $exclude[] = $logout_pageid.','.$changepwd_pageid.','.$account_pageid; else : $regisdter_pageid = get_option('apptivo_ecommerce_register_page_id '); $login_pageid = get_option('apptivo_ecommerce_login_page_id '); $exclude[] = $regisdter_pageid.','.$login_pageid; endif; $exclude[] = get_option('apptivo_ecommerce_thanks_page_id'); $exclude[] = get_option('apptivo_ecommerce_print_receipt_page_id'); //Secure Checkout Page if(!$secure_checkout_method): $exclude[] = get_option('apptivo_ecommerce_secure_checkout_page_id'); endif; //Checkout Page if(!$checkout_page): $exclude[] = get_option('apptivo_ecommerce_checkout_page_id'); endif; return $exclude; } /* Footer */ add_action( 'wp_footer', 'apptivo_ecommerce_demo_store' ); /** * Demo Site * * Adds a demo store banner to the site if enabled **/ function apptivo_ecommerce_demo_store() { if (get_option('apptivo_ecommerce_demo_store')=='yes') : echo '

'.__("This demo site for testing purpose. You can add items to the cart and view various pages, but you can't place the order.", 'apptivo-ecommerce').'

'; endif; }