# subscription/1.5.1/includes/Utils/ProductFactory.php

Subscriptions for WooCommerce with Stripe Recurring Payments, version 1.5.1. 13 lines.

- Page: https://pluginprobe.com/plugins/subscription/1.5.1/code/includes/Utils/ProductFactory.php
- Raw: https://pluginprobe.com/plugins/subscription/1.5.1/raw/includes/Utils/ProductFactory.php
- Modified: 2025-07-08T17:04:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/subscription/1.5.1/code/includes/Utils/ProductFactory.php#L10-L20`.

```php
<?php

namespace SpringDevs\Subscription\Utils;

class ProductFactory {

	public static function load( \WC_Product $product ): Product {
		$product_data_class = apply_filters( '_subscrpt_product_data_class', SubscriptionProduct::class, $product );

		return new $product_data_class( $product );
	}
}

```
