woocommerce_customer_stock_notifications_settings filter-hookWC 10.2.0

Filter the Customer Stock Notifications settings.

Usage

add_filter( 'woocommerce_customer_stock_notifications_settings', 'wp_kama_woocommerce_customer_stock_notifications_settings_filter' );

/**
 * Function for `woocommerce_customer_stock_notifications_settings` filter-hook.
 * 
 * @param array $default_customer_stock_notifications_settings The default Customer Stock Notifications settings.
 *
 * @return array
 */
function wp_kama_woocommerce_customer_stock_notifications_settings_filter( $default_customer_stock_notifications_settings ){

	// filter...
	return $default_customer_stock_notifications_settings;
}
$default_customer_stock_notifications_settings(array)
The default Customer Stock Notifications settings.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

SettingsController::add_customer_stock_notifications_settings()
woocommerce_customer_stock_notifications_settings
woocommerce/src/Internal/StockNotifications/Admin/SettingsController.php 83-144
$stock_notification_settings = apply_filters(
	'woocommerce_customer_stock_notifications_settings',
	array(

		array(
			'title' => __( 'Customer stock notifications', 'woocommerce' ),
			'type'  => 'title',
			'desc'  => '',
			'id'    => 'product_customer_stock_notifications_options',
		),

		array(
			'title'   => __( 'Allow sign-ups', 'woocommerce' ),
			'desc'    => __( 'Let customers sign up to be notified when products in your store are restocked.', 'woocommerce' ),
			'id'      => 'woocommerce_customer_stock_notifications_allow_signups',
			'default' => 'no',
			'type'    => 'checkbox',
		),

		array(
			'title'   => __( 'Require double opt-in to sign up', 'woocommerce' ),
			'desc'    => __( 'To complete the sign-up process, customers must follow a verification link sent to their e-mail after submitting the sign-up form.', 'woocommerce' ),
			'id'      => 'woocommerce_customer_stock_notifications_require_double_opt_in',
			'default' => 'no',
			'type'    => 'checkbox',
		),

		array(
			'title'   => __( 'Delete unverified notification sign-ups after (in days)', 'woocommerce' ),
			'desc'    => __( 'Controls how long the plugin will store unverified notification sign-ups in the database. Enter zero, or leave this field empty if you would like to store expired sign-up requests indefinitey.', 'woocommerce' ),
			'id'      => 'woocommerce_customer_stock_notifications_unverified_deletions_days_threshold',
			'default' => Config::get_unverified_deletion_days_threshold(),
			'type'    => 'number',
		),

		array(
			'title'           => __( 'Guest sign-up', 'woocommerce' ),
			'desc'            => __( 'Customers must be logged in to sign up for stock notifications.', 'woocommerce' ),
			'id'              => 'woocommerce_customer_stock_notifications_require_account',
			'default'         => 'no',
			'type'            => 'checkbox',
			'desc_tip'        => __( 'When enabled, guests will be redirected to a login page to complete the sign-up process.', 'woocommerce' ),
			'checkboxgroup'   => 'start',
			'hide_if_checked' => 'option',
		),

		array(
			'desc'            => __( 'Create an account when guests sign up for stock notifications.', 'woocommerce' ),
			'id'              => 'woocommerce_customer_stock_notifications_create_account_on_signup',
			'default'         => 'no',
			'type'            => 'checkbox',
			'checkboxgroup'   => 'end',
			'hide_if_checked' => 'yes',
			'autoload'        => true,
		),

		array(
			'type' => 'sectionend',
			'id'   => 'product_customer_stock_notifications_options',
		),
	)
);

Where the hook is used in WooCommerce

Usage not found.