Title: Undefined property: stdClass::$sections
Last modified: January 22, 2019

---

# Undefined property: stdClass::$sections

 *  Resolved [killua99](https://wordpress.org/support/users/killua99/)
 * (@killua99)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/)
 * I’m having few of these Notice messages.
 *  ( ! ) Notice: Undefined property: stdClass::$sections in /www/xxxxx/wp-content/
   plugins/mailchimp-for-wp-premium/licensing/class-admin.php on line 193
 * How could I fix them?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [killua99](https://wordpress.org/support/users/killua99/)
 * (@killua99)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/#post-11117454)
 * If you want to avoid a PHP Notice, override the file class-admin.php on your 
   Premium Plugin.
 * And replace the entire function fetch_plugin()
 *     ```
       	/**
       	 * @return object
       	 */
       	private function fetch_plugin() {
       		static $data;
   
       		if( $data === null ) {
       			$client = $this->get_api_client();
       			try {
       				// @NOTE this should probably be dynamic
       				$data = $client->request( 'GET', '/plugins/premium?format=wp' );
       				if ( !empty($data->sections)) {
       					$data->sections = (array) $data->sections;
       				}
       				if( ! empty( $data->banners ) ) {
       					$data->banners = (array) $data->banners;
       				}
   
       				// add activation token to download URL's
       				$license = $this->load_license();
       				if( ! empty( $license->token ) ) {
   
       					if (!empty($data->package)) {
       						$data->package = add_query_arg( array( 'token' => $license->token ), $data->package );
       					} else {
       						$data->package = add_query_arg( array( 'token' => $license->token ), null );
       					}
       					$data->download_link = $data->package;
       				} else {
       					$data->sections['changelog'] = '<div class="notice notice-warning"><p>' . sprintf( 'You will need to <a href="%s">activate your plugin license</a> to install this update.', admin_url( 'admin.php?page=mailchimp-for-wp-other' ) ) . '</p></div>' . $data->sections['changelog'];
       					$data->upgrade_notice = 'You will need to activate your plugin license to install this update.';
       					$data->package = '';
       				}
       			} catch( Exception $e ) {
       				$data = (object) array();
       			}
       		}
       ```
   
 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/#post-11117868)
 * Hi,
 * What version of the Premium add-on are you using?
 * Overwriting the file may not be the best solution as your changes will be undone
   when the plugin is updated.
 * ​Thanks for letting us know.
 *  Thread Starter [killua99](https://wordpress.org/support/users/killua99/)
 * (@killua99)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/#post-11121333)
 * Hi, is not the best solution I’m with you, but was the only place to put the 
   code.
 * The latest version of the premium plugin, the 4.5.5.
 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/#post-11137359)
 * Hello,
 * For support of premium products, please reach us out at “support@mc4wp.com” as
   it’s against the rules of this forum for us to provide support on plugins not
   sold here.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Undefined property: stdClass::$sections’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasssections/#post-11137359)
 * Status: resolved