Saving ...

General settings

print_setting_html('guests','toggle','Enable for guests','Show the subscription form for unregistred users'); $admail_settings->print_setting_html('unsubscribe','toggle','Allow users to unsubscribe',"Add an unsubscribe link to the 'subscribed' notice"); $admail_settings->print_setting_html('email_field','toggle','Show Email field for registred users','If disabled, the E-mail used during registration will be used.'); $admail_settings->print_setting_html('auto_submission','toggle','Auto Submit Notice','Automatically submit notifications once a product is back in stock.'); $popup_enabled = ambisn_get_setting('popup') == 1 ? 'enabled' : ''; echo ''; //$admail_settings->print_setting_html('ajaxify_submission','toggle','Ajax Form Submission','Enable seamless subscription submissions without page reloads.'); //Exclude by product type $product_types = array('simple'=>'Simple', 'variable'=>'Variable', 'grouped'=>'Grouped'); $admail_settings->print_setting_html('exclude_product_type','multiselect','Exclude by product type','', $product_types); //Exclude by categories $categories = array(); $product_categories = get_terms( array('taxonomy' => 'product_cat')); foreach ( $product_categories as $product_category ) { $categories[$product_category->slug] = $product_category->name; } $admail_settings->print_setting_html('exclude_categories','multiselect','Exclude products by categories','', $categories); //Exclude by tag names $product_tag_names = get_terms( array( 'taxonomy' => 'product_tag', 'hide_empty' => false, 'fields' => 'all', ) ); $tag_id_name_array = array(); if ( ! empty( $product_tag_names ) && ! is_wp_error( $product_tag_names ) ) { foreach ( $product_tag_names as $tag ) { $tag_id_name_array[$tag->term_id] = $tag->name; } } $admail_settings->print_setting_html('exclude_tag_names','multiselect','Exclude products by tag names','', $tag_id_name_array); $admail_settings->print_setting_html('s-variation','toggle','Hide subscription form on variation availability','Hide the subscription form if at least one variation is in stock.'); $admail_settings->print_setting_html('prevent_dupl_subscriptions','toggle','Prevent Duplicate Subscriptions','Recommended when working with duplicated or translated products to avoid multiple subscriptions for the same product across different versions.'); $custom_position_enabled = ambisn_get_setting('enable_custom_form_position') == 1 ? 'enabled' : ''; echo '
'; $admail_settings->print_setting_html('enable_custom_form_position','toggle','Enable custom form position (BETA)','','','hider'); echo '
'; $product_positions = array( 'woocommerce_before_single_product_summary' => 'Before the product summary', 'woocommerce_single_product_summary' => 'Inside the product summary (Default)', 'woocommerce_after_single_product_summary' => 'After the product summary', 'woocommerce_after_single_product' => 'After the single product wrapper', 'woocommerce_product_thumbnails' => 'After the product image thumbnails', 'woocommerce_before_add_to_cart_form' => 'Before the add to cart form', 'woocommerce_after_add_to_cart_form' => 'After the add to cart form', 'woocommerce_before_add_to_cart_button' => 'Before the add to cart button', 'woocommerce_after_add_to_cart_button' => 'After the add to cart button', ); $hook_priority = [ 0 => 'Priority - 0', 5 => 'Priority - 5', 10 => 'Priority - 10', 15 => 'Priority - 15' , 20 => 'Priority - 20' , 25 => 'Priority - 25', 30 => 'Priority - 30' , 35 => 'Priority - 35', 40 => 'Priority - 40' ]; $admail_settings->print_setting_html('s_products_position', 'dropdown', 'Simple products (*)', '', $product_positions); $admail_settings->print_setting_html('s_hook_priority', 'dropdown', '', '', $hook_priority); $admail_settings->print_setting_html('v_products_position', 'dropdown', 'Variable products (**)', '', $product_positions); $admail_settings->print_setting_html('v_hook_priority', 'dropdown', '', '', $hook_priority); echo '

* Adjust the priority to control the position of the subscription form on the page.

'; echo '

** The custom position for variable products will only apply if no variations are available and WooCommerce’s "Hide out of stock items from the catalog" setting is enabled.

'; echo '
'; echo '
'; ?>

Subscription Form

Subscription form shortcode

Add this shortcode to any WooCommerce product page where you want the subscription form to appear.

[admail_subscription_form]

Form

print_setting_html('form_text','input','','Form Text'); $admail_settings->print_setting_html('form_subscribed_text','input','','Subscribed - Text'); $admail_settings->print_setting_html('form_previously_subscribed_notice','input','','Previously subscribed - Notice'); ?>
print_setting_html('form_bg_color','color','','Background Color'); ?>

Button

print_setting_html('btn_icon','toggle','Icon Visibility','When enabled, the button will be displayed with an icon.'); ?>
print_setting_html('button_text','input','','Button Text'); ?>
print_setting_html('button_text_color','color','','Text Color'); ?>
print_setting_html('button_border_radius','input','','Border Radius'); ?>
print_setting_html('button_bg_color','color','','Background Color'); ?>

Subscribed texts

print_setting_html('unsubscribe_text','input','','Link Text'); ?>
print_setting_html('subscribed_btn_text','input','','Popup "subscribed" button text'); ?>

reCAPTCHA settings

print_setting_html('recaptcha_tree','toggle','Enable reCAPTCHA v3','Enhance security and prevent spam submissions by enabling reCAPTCHA.'); ?>
print_setting_html('recaptcha_tree_site_key','input','','reCAPTCHA Site Key'); ?>
print_setting_html('recaptcha_tree_secret_key','input','','reCAPTCHA Secret Key'); ?>

Store Info

print_setting_html('store_logo','image','',''); ?>
print_setting_html('store_name','input','',''); ?>

Those information will be used on submitted emails

Store Owner Notification

print_setting_html('store_confirmation_email','toggle','Enable Store Owner Notification','Receive an email notification when a user subscribes.'); ?>
print_setting_html('store_conf_email_recipient','input','','Email Recipient'); ?>

Customers confirmation Emails settings

print_setting_html('confirmation_email','toggle','Enable subscription confirmation Email',''); $admail_settings->print_setting_html('conf_no_reply','toggle','Enable "No reply" option',''); ?>

Template Preview

Please save to update the preview

Emails settings

print_setting_html('no_reply','toggle','Enable "No reply" option',''); $admail_settings->print_setting_html('email_price','toggle','Include the product price',''); $admail_settings->print_setting_html('email_qty','toggle','Include the available quantity',''); ?>
Save