1, 'name' => __( 'Single site', 'releasecart' ), 'amount' => 4900, 'activation_limit' => 1, 'license_length' => '+1 year', 'sort_order' => 0, 'min_quantity' => 1, 'max_quantity' => 1, ) ), ProductPrice::fromArray( array( 'id' => 2, 'name' => __( 'Five sites', 'releasecart' ), 'amount' => 9900, 'activation_limit' => 5, 'license_length' => '+1 year', 'sort_order' => 1, 'min_quantity' => 1, 'max_quantity' => 1, ) ), ); return Product::fromArray( array( 'id' => 0, 'name' => __( 'Sample product', 'releasecart' ), 'slug' => 'sample-product', 'status' => 'published', ), $prices ); } /** * A one-line cart for checkout previews. * * @return Cart */ public static function cart(): Cart { return new Cart( array( new CartLine( self::SAMPLE_PRODUCT_ID, 1, 1, 4900, __( 'Sample product', 'releasecart' ), __( 'Single site', 'releasecart' ) ), ) ); } /** * An accessible SVG placeholder tile. * * @param string $css_class The CSS class the tile carries (matches the real image markup). * @param string $label The accessible label. * @return string Inline SVG markup. */ public static function placeholderTile( string $css_class, string $label ): string { return sprintf( '' . '' . '' . '' . '', esc_attr( $css_class ), esc_attr( $label ) ); } /** * Sentinel product ID for sample cart lines. * * @var int */ private const SAMPLE_PRODUCT_ID = 2147483647; }