diff --git a/src/Ads/AccountService.php b/src/Ads/AccountService.php index 3dd3fef702..2e1eaa6e95 100644 --- a/src/Ads/AccountService.php +++ b/src/Ads/AccountService.php @@ -78,7 +78,7 @@ public function get_connected_account(): array { $status = [ 'id' => $id, 'currency' => $this->options->get( OptionsInterface::ADS_ACCOUNT_CURRENCY ), - 'symbol' => html_entity_decode( get_woocommerce_currency_symbol( $this->options->get( OptionsInterface::ADS_ACCOUNT_CURRENCY ) ) ), + 'symbol' => html_entity_decode( get_woocommerce_currency_symbol( $this->options->get( OptionsInterface::ADS_ACCOUNT_CURRENCY ) ), ENT_QUOTES ), 'status' => $id ? 'connected' : 'disconnected', ]; diff --git a/src/MerchantCenter/MerchantStatuses.php b/src/MerchantCenter/MerchantStatuses.php index cf1765ceaf..c5516a5860 100644 --- a/src/MerchantCenter/MerchantStatuses.php +++ b/src/MerchantCenter/MerchantStatuses.php @@ -427,7 +427,7 @@ protected function get_product_issues( array $statuses ): array { } $product_issue_template = [ - 'product' => html_entity_decode( $wc_product->get_name() ), + 'product' => html_entity_decode( $wc_product->get_name(), ENT_QUOTES ), 'product_id' => $wc_product_id, 'created_at' => $created_at, 'applicable_countries' => [], diff --git a/tests/Unit/MerchantCenter/MerchantStatusesTest.php b/tests/Unit/MerchantCenter/MerchantStatusesTest.php index 5a3bfcb83b..162f4c2336 100644 --- a/tests/Unit/MerchantCenter/MerchantStatusesTest.php +++ b/tests/Unit/MerchantCenter/MerchantStatusesTest.php @@ -624,7 +624,7 @@ function ( $value ) use ( $variable_product ) { $this->merchant_issue_query->expects( $this->once() )->method( 'update_or_insert' )->with( [ [ - 'product' => html_entity_decode( $product_1->get_name() ), + 'product' => html_entity_decode( $product_1->get_name(), ENT_QUOTES ), 'product_id' => $product_1->get_id(), 'created_at' => $this->merchant_statuses->get_cache_created_time()->format( 'Y-m-d H:i:s' ), 'applicable_countries' => json_encode( [ 'ES' ] ),