Skip to content

Commit

Permalink
AfterPay specific code for description is no longer required.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Nov 28, 2023
1 parent eda5176 commit 084c6dc
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,6 @@ public function start( Payment $payment ) {
// Description.
$description = $line->get_description();

if ( empty( $description ) && PaymentBrands::AFTERPAY === $payment_brand ) {
/*
* The `OrderItem.description` field is documented as `0..1` (optional),
* but for AfterPay payments it is required.
*
* @link https://github.com/wp-pay-gateways/omnikassa-2/tree/feature/post-pay/documentation#error-5024
*/
$description = $name;
}

if ( null !== $description ) {
$description = DataHelper::sanitize_an( $description, 100 );
}
Expand Down

0 comments on commit 084c6dc

Please sign in to comment.