Sahreyourcart evilness. Closes #1934.

This commit is contained in:
Mike Jolley 2012-12-06 15:51:20 +00:00
parent a9d5df1c13
commit 7a9ca4d888
1 changed files with 8 additions and 2 deletions

View File

@ -22,8 +22,11 @@ class WC_ShareYourCart extends WC_Integration {
// Load the settings.
$this->settings = ( array ) get_option( $this->plugin_id . $this->id . '_settings' ); //do not rely on the base implementation of init_settings
if ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] == 'yes' ) {
//the classes need to be initialized
$this->init_share_your_cart();
}
//hook to the admin settings page
add_action( 'woocommerce_update_options_integration_shareyourcart', array( &$this, 'process_forms') );
@ -69,6 +72,7 @@ class WC_ShareYourCart extends WC_Integration {
function process_forms() {
//after this function completes, WooCommerce will refresh the page, so we need to save the data here
$this->init_share_your_cart();
//stripslashes from button_html
if(isset($_POST['button_html']))
@ -90,6 +94,8 @@ class WC_ShareYourCart extends WC_Integration {
*/
function admin_options() {
$this->init_share_your_cart();
if ( $this->shareYourCartWooCommerce->isActive() ) {
// call this manually ( to determine if there needs to be a table update, or not )