Files

566 lines
19 KiB
PHP
Raw Permalink Normal View History

2019-03-31 00:21:31 -04:00
<?php
/**
* Model - Product
*
* Resolves product crud object model
*
2019-10-25 19:13:36 -04:00
* @package WPGraphQL\WooCommerce\Model
2019-03-31 00:21:31 -04:00
* @since 0.0.1
*/
2019-10-25 19:13:36 -04:00
namespace WPGraphQL\WooCommerce\Model;
2019-03-31 00:21:31 -04:00
use GraphQLRelay\Relay;
/**
* Class Product
2023-06-13 23:17:02 +03:00
*
* @property \WC_Product $wc_data
* @property \WP_Post_Type $post_type_object
*
* @property int $ID
* @property string $id
* @property string $type
* @property string $slug
* @property string $name
* @property string $date
* @property string $modified
* @property string $status
* @property bool $featured
* @property string $description
* @property string $descriptionRaw
* @property string $shortDescription
* @property string $shortDescriptionRaw
* @property string $sku
* @property string $dateOnSaleFrom
* @property string $dateOnSaleTo
* @property bool $reviewsAllowed
* @property string $purchaseNote
* @property int $menuOrder
* @property float $averageRating
* @property int $reviewCount
* @property bool $onSale
* @property bool $purchasable
* @property string $catalogVisibility
* @property int $totalSales
*
* @property array $upsell_ids
* @property array $attributes
* @property array $default_attributes
* @property int $image_id
* @property int[] $gallery_image_ids
* @property int[] $category_ids
* @property int[] $tag_ids
* @property int $parent_id
*
* @property bool $manageStock
* @property int $stockQuantity
* @property string $backorders
* @property bool $backordersAllowed
* @property bool $soldIndividually
* @property float $weight
* @property float $length
* @property float $width
* @property float $height
* @property int $shippingClassId
* @property bool $shippingRequired
* @property bool $shippingTaxable
* @property array $cross_sell_ids
* @property string $stockStatus
*
* @property bool $virtual
* @property int $downloadExpiry
* @property bool $downloadable
* @property int $downloadLimit
* @property array $downloads
*
* @property string $price
* @property float|float[] $priceRaw
* @property string $regularPrice
* @property float|float[] $regularPriceRaw
* @property string $salePrice
* @property float|float[] $salePriceRaw
* @property string $taxStatus
* @property string $taxClass
*
* @property string $externalUrl
* @property string $buttonText
*
* @property string $addToCartText
* @property string $addToCartDescription
* @property int[] $grouped_ids
*
* @property int[] $variation_ids
*
* @mixin \WC_Product
2023-06-13 23:17:02 +03:00
* @package WPGraphQL\WooCommerce\Model
2019-03-31 00:21:31 -04:00
*/
2020-04-30 17:12:56 -04:00
class Product extends WC_Post {
2019-03-31 00:21:31 -04:00
/**
2020-02-13 23:00:55 -06:00
* Stores the product type: external, grouped, simple, variable.
2019-03-31 00:21:31 -04:00
*
2020-02-13 23:00:55 -06:00
* @var string
2019-03-31 00:21:31 -04:00
*/
protected $product_type;
/**
* Cached variation prices to avoid redundant lookups across
* multiple pricing fields (price, regularPrice, salePrice, etc.).
*
* @var array|null
*/
private $variation_prices = null;
2019-12-03 16:26:10 -05:00
/**
2020-02-13 23:00:55 -06:00
* Stores product factory.
2019-12-03 16:26:10 -05:00
*
* @var \WC_Product_Factory|null
2019-12-03 16:26:10 -05:00
*/
protected static $product_factory = null;
2019-03-31 00:21:31 -04:00
/**
2020-02-13 23:00:55 -06:00
* Product constructor.
2019-03-31 00:21:31 -04:00
*
2021-07-05 13:51:52 -04:00
* @param int|\WC_Data $id - product post-type ID.
2023-06-13 23:17:02 +03:00
*
* @throws \Exception Failed to retrieve product data source.
2019-03-31 00:21:31 -04:00
*/
public function __construct( $id ) {
2020-04-30 17:12:56 -04:00
// Get WC_Product object.
2021-07-05 13:51:52 -04:00
$data = \wc_get_product( $id );
2020-04-30 17:12:56 -04:00
2023-06-13 23:17:02 +03:00
// Check if product is valid.
if ( ! is_object( $data ) ) {
throw new \Exception( __( 'Failed to retrieve product data source', 'graphql-for-ecommerce' ) );
2023-06-13 23:17:02 +03:00
}
2020-09-22 08:17:01 -04:00
parent::__construct( $data );
2019-03-31 22:48:57 -04:00
}
/**
* {@inheritDoc}
*/
protected static function get_allowed_restricted_fields( $allowed_restricted_fields = [] ) {
return array_merge(
parent::get_allowed_restricted_fields(),
[ 'type' ]
);
}
2023-06-13 23:17:02 +03:00
/**
* Returns the product type.
*
* @return string
*/
public function get_type() {
return $this->wc_data->get_type();
}
2019-06-02 00:06:32 -04:00
/**
* Returns string of variation price range.
*
* @param string $pricing_type - Range selected pricing type.
* @param boolean $raw - Whether to return raw value.
2019-06-02 00:06:32 -04:00
*
* @return string|null
*/
private function get_variation_price( $pricing_type = '', $raw = false ) {
2023-06-13 23:17:02 +03:00
/**
* Variable product data source.
*
* @var \WC_Product_Variable $data
*/
$data = $this->wc_data;
if ( is_null( $this->variation_prices ) ) {
$this->variation_prices = $data->get_variation_prices( true );
}
$prices = $this->variation_prices;
2019-06-02 00:06:32 -04:00
2020-09-22 08:17:01 -04:00
if ( empty( $prices['price'] ) || ( 'sale' === $pricing_type && ! $this->wc_data->is_on_sale() ) ) {
2019-06-02 00:06:32 -04:00
return null;
}
2021-01-26 18:14:33 -05:00
switch ( $pricing_type ) {
case 'sale':
$prices = array_values( array_diff( $prices['sale_price'], $prices['regular_price'] ) );
break;
case 'regular':
$prices = $prices['regular_price'];
break;
default:
$prices = $prices['price'];
break;
}
sort( $prices, SORT_NUMERIC );
graphql_debug( implode( ', ', $prices ) );
2021-01-26 18:14:33 -05:00
if ( $raw ) {
2021-09-08 11:32:25 +05:30
return implode( ', ', $prices );
2021-01-26 18:14:33 -05:00
}
2023-06-21 13:21:29 -04:00
return wc_graphql_price_range( current( $prices ), end( $prices ) );
2019-06-02 00:06:32 -04:00
}
2019-03-31 00:21:31 -04:00
/**
* Initializes the Product field resolvers
*
* @access protected
2019-03-31 00:21:31 -04:00
*/
protected function init() {
2019-03-31 00:21:31 -04:00
if ( empty( $this->fields ) ) {
2020-09-22 08:17:01 -04:00
parent::init();
2020-10-22 16:01:35 -04:00
$type = $this->wc_data->get_type();
$fields = [
'ID' => function () {
2023-06-13 23:17:02 +03:00
return ! empty( $this->wc_data->get_id() ) ? $this->wc_data->get_id() : null;
},
'id' => function () {
return ! empty( $this->ID ) ? Relay::toGlobalId( 'post', "{$this->ID}" ) : null;
2019-03-31 00:21:31 -04:00
},
'type' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_type() ) ? $this->wc_data->get_type() : null;
2019-03-31 00:21:31 -04:00
},
'slug' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_slug() ) ? $this->wc_data->get_slug() : null;
2019-03-31 00:21:31 -04:00
},
'name' => function () {
return ! empty( $this->wc_data->get_name() ) ? html_entity_decode( $this->wc_data->get_name() ) : null;
2019-03-31 00:21:31 -04:00
},
'date' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data ) ? $this->wc_data->get_date_created() : null;
2019-04-06 12:39:55 -04:00
},
'modified' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data ) ? $this->wc_data->get_date_modified() : null;
2019-04-06 12:39:55 -04:00
},
'status' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_status() ) ? $this->wc_data->get_status() : null;
2019-03-31 00:21:31 -04:00
},
'featured' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_featured();
2019-03-31 00:21:31 -04:00
},
'description' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_description() )
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
2020-09-22 08:17:01 -04:00
? apply_filters( 'the_content', $this->wc_data->get_description() )
: null;
2019-03-31 00:21:31 -04:00
},
'descriptionRaw' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_description() ) ? $this->wc_data->get_description() : null;
},
'shortDescription' => function () {
2020-09-22 08:17:01 -04:00
$short_description = ! empty( $this->wc_data->get_short_description() )
2019-11-04 22:49:03 -05:00
? apply_filters(
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
2019-11-04 22:49:03 -05:00
'get_the_excerpt',
2020-09-22 08:17:01 -04:00
$this->wc_data->get_short_description(),
get_post( $this->wc_data->get_id() )
2019-11-04 22:49:03 -05:00
)
: null;
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
return apply_filters( 'the_excerpt', $short_description );
2019-03-31 00:21:31 -04:00
},
'shortDescriptionRaw' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_short_description() ) ? $this->wc_data->get_short_description() : null;
},
'sku' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_sku() ) ? $this->wc_data->get_sku() : null;
2019-03-31 00:21:31 -04:00
},
'dateOnSaleFrom' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_date_on_sale_from() ) ? $this->wc_data->get_date_on_sale_from() : null;
2019-03-31 00:21:31 -04:00
},
'dateOnSaleTo' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_date_on_sale_to() ) ? $this->wc_data->get_date_on_sale_to() : null;
2019-03-31 00:21:31 -04:00
},
'reviewsAllowed' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_reviews_allowed() ) ? $this->wc_data->get_reviews_allowed() : null;
2019-03-31 00:21:31 -04:00
},
'purchaseNote' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_purchase_note() ) ? $this->wc_data->get_purchase_note() : null;
2019-03-31 00:21:31 -04:00
},
'menuOrder' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_menu_order();
2019-03-31 00:21:31 -04:00
},
'averageRating' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_average_rating();
2019-03-31 00:21:31 -04:00
},
'reviewCount' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_review_count();
2019-03-31 00:21:31 -04:00
},
2019-10-17 21:39:38 -04:00
'onSale' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_on_sale();
2019-04-08 14:07:11 -04:00
},
2019-10-17 21:39:38 -04:00
'purchasable' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_purchasable();
2019-04-08 14:07:11 -04:00
},
2020-01-11 15:39:04 -05:00
/**
* Editor/Shop Manager only fields
*/
'catalogVisibility' => [
'callback' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_catalog_visibility() ) ? $this->wc_data->get_catalog_visibility() : null;
2020-01-11 15:39:04 -05:00
},
'capability' => $this->post_type_object->cap->edit_posts,
],
'totalSales' => [
'callback' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_total_sales();
2020-01-11 15:39:04 -05:00
},
'capability' => $this->post_type_object->cap->edit_posts,
],
2020-01-11 15:39:04 -05:00
2019-03-31 00:21:31 -04:00
/**
* Connection resolvers fields
*
* These field resolvers are used in connection resolvers to define WP_Query argument
* Note: underscore naming style is used as a quick identifier
*/
'upsell_ids' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_upsell_ids() )
? array_map( 'absint', $this->wc_data->get_upsell_ids() )
: [ '0' ];
2019-03-31 00:21:31 -04:00
},
'attributes' => function () {
return ! empty( $this->wc_data->get_attributes() ) ? $this->wc_data->get_attributes() : [];
2019-03-31 00:21:31 -04:00
},
'default_attributes' => function () {
return ! empty( $this->wc_data->get_default_attributes() ) ? $this->wc_data->get_default_attributes() : [ '0' ];
2019-03-31 00:21:31 -04:00
},
2019-10-17 21:39:38 -04:00
'image_id' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_image_id() ) ? $this->wc_data->get_image_id() : null;
},
'gallery_image_ids' => function () {
return ! empty( $this->wc_data->get_gallery_image_ids() ) ? $this->wc_data->get_gallery_image_ids() : [ '0' ];
2019-03-31 00:21:31 -04:00
},
'category_ids' => function () {
return ! empty( $this->wc_data->get_category_ids() ) ? $this->wc_data->get_category_ids() : [ '0' ];
2019-03-31 22:48:57 -04:00
},
'tag_ids' => function () {
return ! empty( $this->wc_data->get_tag_ids() ) ? $this->wc_data->get_tag_ids() : [ '0' ];
2019-03-31 00:21:31 -04:00
},
'parent_id' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_parent_id() ) ? $this->wc_data->get_parent_id() : null;
},
'post' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->post ) ? $this->wc_data->post : null;
2019-11-13 21:06:01 -05:00
},
];
2019-10-17 21:39:38 -04:00
2020-10-22 16:01:35 -04:00
if (
apply_filters(
"graphql_{$type}_product_model_use_pricing_and_tax_fields",
2021-01-26 18:14:33 -05:00
'grouped' !== $this->wc_data->get_type()
2020-10-22 16:01:35 -04:00
)
) {
$fields += [
'price' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_price() )
2023-06-21 13:21:29 -04:00
? wc_graphql_price( \wc_get_price_to_display( $this->wc_data ) )
: null;
},
'priceRaw' => function () {
return ! empty( $this->wc_data->get_price() ) ? $this->wc_data->get_price() : null;
},
'regularPrice' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_regular_price() )
2023-06-21 13:21:29 -04:00
? wc_graphql_price( \wc_get_price_to_display( $this->wc_data, [ 'price' => $this->wc_data->get_regular_price() ] ) )
: null;
},
'regularPriceRaw' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_regular_price() ) ? $this->wc_data->get_regular_price() : null;
},
'salePrice' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_sale_price() )
2023-06-21 13:21:29 -04:00
? wc_graphql_price(
\wc_get_price_to_display(
$this->wc_data,
[
'price' => $this->wc_data->get_sale_price(),
]
)
)
: null;
},
'salePriceRaw' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_sale_price() ) ? $this->wc_data->get_sale_price() : null;
},
'taxStatus' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_tax_status() ) ? $this->wc_data->get_tax_status() : null;
},
'taxClass' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_tax_class();
},
];
}//end if
2019-10-17 21:39:38 -04:00
2020-10-22 16:01:35 -04:00
if (
apply_filters(
"graphql_{$type}_product_model_use_inventory_fields",
'simple' === $type || 'variable' === $type
)
) {
$fields += [
'manageStock' => function () {
return ! empty( $this->wc_data->get_manage_stock() ) ? $this->wc_data->get_manage_stock() : null;
},
'stockQuantity' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_stock_quantity() ) ? $this->wc_data->get_stock_quantity() : null;
},
'backorders' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_backorders() ) ? $this->wc_data->get_backorders() : null;
},
'backordersAllowed' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->backorders_allowed();
},
'soldIndividually' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_sold_individually();
},
'lowStockAmount' => function () {
return ! empty( $this->wc_data->get_low_stock_amount() ) ? $this->wc_data->get_low_stock_amount() : null;
},
'weight' => function () {
2020-10-27 23:55:16 -04:00
return ! empty( $this->wc_data->get_weight() ) ? $this->wc_data->get_weight() : null;
},
'length' => function () {
2020-10-27 23:55:16 -04:00
return ! empty( $this->wc_data->get_length() ) ? $this->wc_data->get_length() : null;
},
'width' => function () {
2020-10-27 23:55:16 -04:00
return ! empty( $this->wc_data->get_width() ) ? $this->wc_data->get_width() : null;
},
'height' => function () {
2020-10-27 23:55:16 -04:00
return ! empty( $this->wc_data->get_height() ) ? $this->wc_data->get_height() : null;
},
'shippingClassId' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_image_id() ) ? $this->wc_data->get_shipping_class_id() : null;
},
'shippingRequired' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->needs_shipping();
},
'shippingTaxable' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_shipping_taxable();
},
'cross_sell_ids' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_cross_sell_ids() )
? array_map( 'absint', $this->wc_data->get_cross_sell_ids() )
: [ '0' ];
},
'stockStatus' => function () {
2020-10-22 16:01:35 -04:00
return ! empty( $this->wc_data->get_stock_status() ) ? $this->wc_data->get_stock_status() : null;
},
];
}//end if
2019-10-17 21:39:38 -04:00
2020-10-22 16:01:35 -04:00
switch ( true ) {
case apply_filters( "graphql_{$type}_product_model_use_virtual_data_fields", 'simple' === $type ):
$fields += [
'virtual' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_virtual();
2019-10-17 21:39:38 -04:00
},
'downloadExpiry' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->get_download_expiry();
2019-10-17 21:39:38 -04:00
},
'downloadable' => function () {
2023-06-13 23:17:02 +03:00
return $this->wc_data->is_downloadable();
2019-10-17 21:39:38 -04:00
},
'downloadLimit' => function () {
2023-06-13 23:17:02 +03:00
return ! empty( $this->wc_data->get_download_limit() ) ? $this->wc_data->get_download_limit() : null;
2019-10-17 21:39:38 -04:00
},
'downloads' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_downloads() ) ? $this->wc_data->get_downloads() : null;
2019-10-17 21:39:38 -04:00
},
];
2019-10-17 21:39:38 -04:00
break;
2020-10-22 16:01:35 -04:00
case apply_filters( "graphql_{$type}_product_model_use_variation_pricing_fields", 'variable' === $type ):
$fields = [
'price' => function () {
2019-10-17 21:39:38 -04:00
return $this->get_variation_price();
},
'regularPrice' => function () {
2020-01-11 15:39:04 -05:00
return $this->get_variation_price( 'regular' );
},
'salePrice' => function () {
2020-01-11 15:39:04 -05:00
return $this->get_variation_price( 'sale' );
},
'variation_ids' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_children() )
? array_map( 'absint', $this->wc_data->get_children() )
: [ '0' ];
2020-01-11 15:39:04 -05:00
},
'priceRaw' => function () {
return $this->get_variation_price( '', true );
},
'regularPriceRaw' => function () {
return $this->get_variation_price( 'regular', true );
},
'salePriceRaw' => function () {
return $this->get_variation_price( 'sale', true );
},
] + $fields;
2019-10-17 21:39:38 -04:00
break;
2020-10-22 16:01:35 -04:00
case apply_filters( "graphql_{$type}_product_model_use_external_fields", 'external' === $type ):
$fields += [
'externalUrl' => function () {
2023-06-13 23:17:02 +03:00
/**
* External product
*
* @var \WC_Product_External $data
*/
$data = $this->wc_data;
return ! empty( $data->get_product_url() ) ? $data->get_product_url() : null;
2019-10-17 21:39:38 -04:00
},
'buttonText' => function () {
2023-06-13 23:17:02 +03:00
/**
* External product
*
* @var \WC_Product_External $data
*/
$data = $this->wc_data;
return ! empty( $data->get_button_text() ) ? $data->get_button_text() : null;
2019-10-17 21:39:38 -04:00
},
];
2019-10-17 21:39:38 -04:00
break;
2021-01-21 22:41:43 -05:00
case apply_filters( "graphql_{$type}_product_model_use_grouped_fields", 'grouped' === $type ):
$fields += [
'addToCartText' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->add_to_cart_text() ) ? $this->wc_data->add_to_cart_text() : null;
2019-10-17 21:39:38 -04:00
},
'addToCartDescription' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->add_to_cart_description() )
? $this->wc_data->add_to_cart_description()
2019-10-17 21:39:38 -04:00
: null;
},
'grouped_ids' => function () {
2020-09-22 08:17:01 -04:00
return ! empty( $this->wc_data->get_children() )
? array_map( 'absint', $this->wc_data->get_children() )
: [ '0' ];
2019-10-17 21:39:38 -04:00
},
];
2019-10-17 21:39:38 -04:00
break;
}//end switch
2019-10-17 21:39:38 -04:00
/**
* Defines aliased fields
*
* These fields are used primarily by WPGraphQL core Node* interfaces
* and some fields act as aliases/decorator for existing fields.
*/
$fields += [
'commentCount' => function () {
2021-01-21 22:41:43 -05:00
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
2023-06-13 23:17:02 +03:00
return ! empty( $this->reviewCount ) ? $this->reviewCount : null;
},
'commentStatus' => function () {
2021-01-21 22:41:43 -05:00
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
2023-06-13 23:17:02 +03:00
return isset( $this->reviewsAllowed ) && $this->reviewsAllowed ? 'open' : 'closed';
},
];
2020-09-22 08:17:01 -04:00
$this->fields = array_merge( $this->fields, $fields );
}//end if
2019-03-31 00:21:31 -04:00
}
}