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.
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' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.6 | Introduced. |