Do not fully accepy html and spécial characters in subject.
Can can we make it so ?
This is the code of the file :
<?php
/**
* Order dispute email.
*
* @package HivePress\Emails
*/
namespace HivePress\Emails;
use HivePress\Helpers as hp;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* Order dispute email class.
*
* @class Order_Dispute
*/
class Order_Dispute extends Email {
/**
* Class constructor.
*
* @param array $args Email arguments.
*/
public function __construct( $args = [] ) {
$args = hp\merge_arrays(
[
'subject' => esc_html__( 'MySmartisan - Réclamation ouverte', 'hivepress-marketplace' ), // Use actual character
'body' => hp\sanitize_html( __(
'<html>
<head>
</head>
<body>
<p>Bonjour,</p>
<p>Une réclamation a été ouverte sur la commande <strong>n°%order_number%</strong>.</p>
<p><strong>Détails de la commande :</strong><br>
<a href="%order_url%">Accéder à la fiche de la commande</a></p>
<p><strong>Motif déclaré :</strong><br>%dispute_details%</p>
<p>Merci de prendre connaissance de cette réclamation et de procéder à son traitement dans les plus brefs délais.</p>
</body>
</html>',
'hivepress-requests'
) ),
],
$args
);
parent::__construct( $args );
}
}
Please note that you need to add code only using this documentation How to add custom code snippets - HivePress Help Center. If you edit the code directly, the update from our side will overwrite these changes and the ones that will be by default. As for emails, you need to overwrite them in HivePress > Emails using this documentation How to customize emails - HivePress Help Center. There, you can switch to the Code editor and add HTML.
Thanks for the details. Admin emails are not available in HivePress/Emails for editing, but it’s still possible to override them using external code snippets without editing the email file directly, please try using this code snippet:
add_filter(
'hivepress/v1/emails/order_dispute',
function ( $email ) {
$email['subject'] = 'custom text or HTML';
$email['body'] = 'custom text or HTML';
return $email;
}
);
add_filter(
'hivepress/v1/emails/offer_submit',
function ( $email ) {
$email['subject'] = 'custom text or HTML';
$email['body'] = 'custom text or HTML';
return $email;
}
);