Noptin_WooCommerce::initialize()
Setup hooks in case the integration is enabled.
Source Source
File: includes/integrations/class-noptin-woocommerce.php
public function initialize() { parent::initialize(); // Orders. add_action( 'woocommerce_new_order', array( $this, 'add_order_subscriber' ), 1 ); add_action( 'woocommerce_checkout_order_processed', array( $this, 'checkout_processed' ), $this->priority ); add_action( 'woocommerce_order_status_completed', array( $this, 'order_completed' ), $this->priority ); add_action( 'woocommerce_payment_complete', array( $this, 'order_paid' ), $this->priority ); add_action( 'woocommerce_order_refunded', array( $this, 'order_refunded' ), $this->priority ); add_action( 'woocommerce_new_order', array( $this, 'order_created' ), $this->priority ); add_action( 'woocommerce_update_order', array( $this, 'order_updated' ), $this->priority ); add_action( 'woocommerce_order_status_pending', array( $this, 'order_pending' ), $this->priority ); add_action( 'woocommerce_order_status_processing', array( $this, 'order_processing' ), $this->priority ); add_action( 'woocommerce_order_status_on-hold', array( $this, 'order_held' ), $this->priority ); add_action( 'woocommerce_order_status_cancelled', array( $this, 'order_cancelled' ), $this->priority ); add_action( 'woocommerce_order_status_failed', array( $this, 'order_failed' ), $this->priority ); // Products. do_action( 'woocommerce_update_product', array( $this, 'product_updated' ), $this->priority ); do_action( 'woocommerce_update_product_variation', array( $this, 'product_updated' ), $this->priority ); do_action( 'woocommerce_new_product_variation', array( $this, 'product_updated' ), $this->priority ); do_action( 'woocommerce_new_product', array( $this, 'product_updated' ), $this->priority ); remove_action( 'save_post', array( $this, 'product_updated' ), $this->priority ); // Automation rules. add_action( 'noptin_automation_rules_load', array( $this, 'register_automation_rules' ), $this->priority ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.6 | Introduced. |