Ensure subscription product description does not exceed 127 characters

This commit is contained in:
Emili Castells Guasch 2023-09-15 15:33:14 +02:00
parent d3a02e79c5
commit a13da931ed
2 changed files with 11 additions and 6 deletions

View file

@ -83,13 +83,10 @@ class CatalogProducts {
*/
public function create( string $name, string $description ): Product {
$data = array(
'name' => $name,
'name' => $name,
'description' => $description ?: $name,
);
if ( $description ) {
$data['description'] = $description;
}
$bearer = $this->bearer->bearer();
$url = trailingslashit( $this->host ) . 'v1/catalogs/products';
$args = array(