Product subscription and Elementor template
-
please tell me, I use two plugins for subscriptions (WooCommerce Subscriptions, All Products for Woo Subscriptions) with their ability to edit subscriptions for variable products and for simple ones, why if the product page template is made through Elementor then these variations do not appear on the page? if they appear (by adding code) for example.
global $product;
if ( $product ) {
if ( class_exists( 'WC_Subscriptions_Product' ) && WC_Subscriptions_Product::is_subscription( $product ) ) {
echo '<div class="subscription-options">';
echo woocommerce_subscriptions_get_subscription_options( $product );
echo '</div>';
} else {
woocommerce_template_single_add_to_cart();
}
}then the product is not recognized as having a subscription option? subscription is configured in the admin panel
If you use a standard template, it becomes possible to buy a variation of the product by subscription.
How to solve this problem?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.