Noptin_WooCommerce::hook_show_checkbox_code( string $checkbox_position )

Hooks the display checkbox code.


Parameters Parameters

$checkbox_position

(string) (Required) The checkbox position to display the checkbox.


Top ↑

Source Source

File: includes/integrations/class-noptin-woocommerce.php

	public function hook_show_checkbox_code( $checkbox_position ) {

		if ( 'after_email_field' === $checkbox_position ) {
			add_filter( 'woocommerce_form_field_email', array( $this, 'add_checkbox_after_email_field' ), 100, 2 );
		} else {
			add_action( $checkbox_position, array( $this, 'output_checkbox' ), 20 );
		}

		add_action( 'woocommerce_checkout_create_order', array( $this, 'save_woocommerce_checkout_checkbox_value' ) );
		add_filter( 'noptin_woocommerce_integration_subscription_checkbox_attributes', array( $this, 'add_woocommerce_class_to_checkbox' ) );
	}

Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.6Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation