Use post title for coupon name

[MAILPOET-5169]
This commit is contained in:
Jan Jakes
2023-06-15 14:08:47 +02:00
committed by Aschepikov
parent 82e2025e83
commit e1cb32dd5a

View File

@@ -314,7 +314,7 @@ class OrderFieldsFactory {
foreach ($coupons as $coupon) {
if ($coupon instanceof WP_Post) {
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$options[] = ['id' => $coupon->post_title, 'name' => $coupon->post_name];
$options[] = ['id' => $coupon->post_title, 'name' => $coupon->post_title];
}
}
return $options;