| Server IP : 62.60.133.156 / Your IP : 216.73.217.51 Web Server : LiteSpeed System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64 User : mimradmin ( 1166) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mimradmin/www/wp-content/themes/woodmart/inc/integrations/ |
Upload File : |
<?php
/**
* WooCommerce Subscriptions integration.
*
* @package woodmart
*/
if ( ! class_exists( 'WC_Subscriptions' ) ) {
return;
}
if ( ! function_exists( 'woodmart_wc_subscriptions_add_variable_types' ) ) {
/**
* Adds variable subscription product type to WoodMart variable product types list.
*
* @param array $types List of variable product types.
* @return array Modified list of product types.
*/
function woodmart_wc_subscriptions_add_variable_types( $types ) {
$types[] = 'variable-subscription';
return $types;
}
add_filter( 'woodmart_variable_product_types', 'woodmart_wc_subscriptions_add_variable_types' );
}
if ( ! function_exists( 'woodmart_wc_subscriptions_add_supported_types' ) ) {
/**
* Adds subscription product types to waitlist and price tracker features.
*
* @param array $types List of allowed product types.
* @return array Modified list of product types.
*/
function woodmart_wc_subscriptions_add_supported_types( $types ) {
$types[] = 'subscription';
$types[] = 'variable-subscription';
$types[] = 'subscription_variation';
return $types;
}
add_filter( 'woodmart_waitlist_allowed_product_types', 'woodmart_wc_subscriptions_add_supported_types' );
add_filter( 'woodmart_price_tracker_allowed_product_types', 'woodmart_wc_subscriptions_add_supported_types' );
}