| @@ -49,40 +49,14 @@ | ||
| 49 | 49 | $context |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - // Get last query time and existing resources. | |
| 54 | - $this->last_queried = get_option( $this->settings_name . '_last_queried' ); | |
| 55 | - $this->resources = get_option( $this->settings_name ); | |
| 53 | + // Call parent initialization function. | |
| 54 | + parent::init(); | |
| 56 | 55 | |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | - * Fetches resources (forms, landing pages or tags) from the API, storing them in the options table | |
| 61 | - * with a last queried timestamp. | |
| 62 | - * | |
| 63 | - * If the refresh results in a 401, removes the access and refresh tokens from the settings. | |
| 64 | - * | |
| 65 | - * @since 3.1.2 | |
| 66 | - * | |
| 67 | - * @return WP_Error|array | |
| 68 | - */ | |
| 69 | - public function refresh() { | |
| 70 | - | |
| 71 | - // Call parent refresh method. | |
| 72 | - $result = parent::refresh(); | |
| 73 | - | |
| 74 | - // If an error occured, maybe delete credentials from the Plugin's settings | |
| 75 | - // if the error is a 401 unauthorized. | |
| 76 | - if ( is_wp_error( $result ) ) { | |
| 77 | - convertkit_maybe_delete_credentials( $result, CONVERTKIT_OAUTH_CLIENT_ID ); | |
| 78 | - } | |
| 79 | - | |
| 80 | - return $result; | |
| 81 | - | |
| 82 | - } | |
| 83 | - | |
| 84 | - /** | |
| 85 | 59 | * Returns all inline forms based on the sort order. |
| 86 | 60 | * |
| 87 | 61 | * @since 2.7.3 |
| 88 | 62 | * |
| @@ -521,10 +495,9 @@ | ||
| 521 | 495 | sprintf( |
| 522 | 496 | /* translators: ConvertKit Form ID */ |
| 523 | 497 | __( 'Kit Form ID %s does not exist on Kit.', 'convertkit' ), |
| 524 | 498 | $id |
| 525 | - ), | |
| 526 | - 404 | |
| 499 | + ) | |
| 527 | 500 | ); |
| 528 | 501 | } |
| 529 | 502 | |
| 530 | 503 | // Initialize Settings. |