Instance ID have to be checked, because on using settings and instace settings together every time the instance settings will be fetched.

This commit is contained in:
Sven Wagener 2016-07-05 21:03:18 +02:00
parent ce8e94b5ff
commit d5a414d0e3
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
*/
public function get_option( $key, $empty_value = null ) {
// Instance options take priority over global options
if ( array_key_exists( $key, $this->get_instance_form_fields() ) ) {
if ( $this->instance_id && array_key_exists( $key, $this->get_instance_form_fields() ) ) {
return $this->get_instance_option( $key, $empty_value );
}