mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix item description with emoji
This commit is contained in:
parent
c3887bec7a
commit
a8c1f386aa
2 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ class ItemFactory {
|
||||||
mb_substr( $product->get_name(), 0, 127 ),
|
mb_substr( $product->get_name(), 0, 127 ),
|
||||||
new Money( $price_without_tax_rounded, $currency ),
|
new Money( $price_without_tax_rounded, $currency ),
|
||||||
$quantity,
|
$quantity,
|
||||||
mb_substr( wp_strip_all_tags( $product->get_description() ), 0, 127 ),
|
substr( wp_strip_all_tags( $product->get_description() ), 0, 127 ) ?: '',
|
||||||
$tax,
|
$tax,
|
||||||
$product->get_sku(),
|
$product->get_sku(),
|
||||||
( $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS
|
( $product->is_virtual() ) ? Item::DIGITAL_GOODS : Item::PHYSICAL_GOODS
|
||||||
|
|
|
@ -300,7 +300,7 @@ class ItemFactoryTest extends TestCase
|
||||||
* @var Item $item
|
* @var Item $item
|
||||||
*/
|
*/
|
||||||
$this->assertEquals(mb_substr($name, 0, 127), $item->name());
|
$this->assertEquals(mb_substr($name, 0, 127), $item->name());
|
||||||
$this->assertEquals(mb_substr($description, 0, 127), $item->description());
|
$this->assertEquals(substr($description, 0, 127), $item->description());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFromPayPalResponse()
|
public function testFromPayPalResponse()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue