cvongrim
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress Share Buttons Plugin – AddThis] Undefined variableWell if someone wants temporary fix until then, here is what I did.
I just wrapped line 1337 in the addthis_social_widget.php with an if statement to check that the variable has been set.
if(isset($addthis_sidebar)){ $AddThis_addjs_sharing_button_plugin->addAfterScript($addthis_sidebar); }
Updating the admin_init() function to this seemed to resolve both issues.
public function admin_init() { if ( isset( $_POST['_wpnonce'] ) && $_POST['_wpnonce'] ) { if ( isset( $_POST[ $this->options ] ) ) { check_admin_referer( $this->options ); $options = $_POST[ $this->options ]; update_option( $this->options, $options ); } else { //update_option( $this->options, '' ); } //wp_safe_redirect( menu_page_url( $this->domain, false ) ); } }
It looks like you where clearing out the options if any other page was saved. Then the other part I commented out seemed to cause any page that saves options to redirect to the plugins page.
Actually when I save a custom post it also seems to wipe all of the customizer fields.
So I have found out it’s because the item in the store should technically require the Large Package shipping since it’s length is greater than 12 inches. However it’s just sends back shipping rates as if it’s just a normal package. Is there any fix for this?
I am not sure, we are just using https://postcalc.usps.com/ to compare the prices.