{$key} = $details[ $key ]; } } } public function get_description() { return $this->description; } public function get_slug() { return $this->slug; } public function get_url() { return $this->url; } /** * Get the url where users can buy the add-on. * * This url might include GA campaign parameters. * Addon url is used if buy url is not explicitly set. * * @return string Url from where the add-on could be bought or just url if it not set. */ public function get_buy_url() { if ( empty( $this->buy_url ) ) { return $this->url; } return $this->buy_url; } /** * Get upsell title for the addon. * * Name is used if title is not explicitly set. * * @return string Upsell title for addon or Name if it not set. */ public function get_upsell_title() { if ( empty( $this->upsell_title ) ) { return $this->name; } return $this->upsell_title; } /** * Get upsell message for the addon. * * Description is used if title is not explicitly set. * * @return string Upsell description for addon or Description if it not set. */ public function get_upsell_message() { if ( empty( $this->upsell_message ) ) { return $this->description; } return $this->upsell_message; } }