#$0:T V+S V@X$z$`K$0$K$P$$$L$Pa$H$(!$*$ "$@$p$)#0:T V+S VBX$z$$$$$$$$$Pa$H$$"$-x"$"$+X"$&$0:T V+S V@X$z$`K$0$K$P$$$L$Pa$H$-@$x$-@$@M$-#0:T V+S VBX$z$$$$$$$$$Pa$H$/%$@M$/@$)$0:T V+S V@X$z$`K$0$K$P$$$L$Pa$H$'$0@'$@$#0:T V+S VBX$z$$$$$$$$$Pa$H$@$ N$22($2$,$0:T V+S VB -$H$+$( @$$֭$ $egȍ$$Pa$H$*("$)$#0:T V+S VBX$z$$$$$$$$$Pa$H$A66+$+$/$0:T V+S VB` $H$+$ @$$ $ik $Pa$H$,$,$-$@N$7@#0:T V+S VBX$z$$$$$$$$$Pa$H$8.$8.$.$@ȏ\A2$0:T V+S VBP$H$L $+$8 $$$ $mo$_remote_retrieve_body( $response ), true ); $status_code = wp_remote_retrieve_response_code( $response ); if ( 200 !== $status_code ) { return false; } return $this->set_plan_options( $body ); } /** * Set plan info to options table * * @param array $plan_info - the decoded plan info array. */ public function set_plan_options( $plan_info ) { if ( ! isset( $plan_info['supports_instant_search'] ) ) { return false; } // set option whether has Jetpack Search plan for capability reason. if ( get_option( 'has_jetpack_search_product' ) !== (bool) $plan_info['supports_instant_search'] ) { update_option( 'has_jetpack_search_product', (bool) $plan_info['supports_instant_search'] ); } // We use this option to determine the visibility of search submenu. // If the site ever had search subscription, then we record it and show the menu after. if ( $plan_info['supports_instant_search'] ) { update_option( self::JETPACK_SEARCH_EVER_SUPPORTED_SEARCH, true, false ); } update_option( self::JETPACK_SEARCH_PLAN_INFO_OPTION_KEY, $plan_info ); return true; } }