Skip to content

Commit

Permalink
Fix PHP warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Sep 23, 2024
1 parent ac6a086 commit 52fd7a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Modules/About_us.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,13 @@ private function get_other_products_data() {
}

$api_data = $this->call_plugin_api( $slug );

if ( ! isset( $product['icon'] ) ) {
if ( ! isset( $product['icon'] ) && ( isset( $api_data->icons['2x'] ) || $api_data->icons['1x'] ) ) {
$products[ $slug ]['icon'] = isset( $api_data->icons['2x'] ) ? $api_data->icons['2x'] : $api_data->icons['1x'];
}
if ( ! isset( $product['description'] ) ) {
if ( ! isset( $product['description'] ) && isset( $api_data->short_description ) ) {
$products[ $slug ]['description'] = $api_data->short_description;
}
if ( ! isset( $product['name'] ) ) {
if ( ! isset( $product['name'] ) && isset( $api_data->name ) ) {
$products[ $slug ]['name'] = $api_data->name;
}
}
Expand Down

0 comments on commit 52fd7a5

Please sign in to comment.