filters(); $this->actions(); } private function filters() { add_filter( 'WooNotify_whatsApp_gateways', function ( $gateway ) { return apply_filters( 'persianwoowhatsApp_whatsApp_gateway', $gateway ); }, 10, 1 ); add_filter( 'WooNotify_settings_sections', function ( $sections ) { return apply_filters( 'persianwoowhatsApp_settings_sections', $sections ); }, 10, 1 ); add_filter( 'WooNotify_main_settings', function ( $settings ) { return apply_filters( 'whatsApp_main_settings_settings', $settings ); }, 10, 1 ); add_filter( 'WooNotify_super_admin_settings', function ( $settings ) { return apply_filters( 'whatsApp_super_admin_settings_settings', $settings ); }, 10, 1 ); add_filter( 'WooNotify_buyer_settings', function ( $settings ) { return apply_filters( 'whatsApp_buyer_settings_settings', $settings ); }, 10, 1 ); add_filter( 'WooNotify_product_admin_settings', function ( $settings ) { return apply_filters( 'whatsApp_product_admin_settings_settings', $settings ); }, 10, 1 ); add_filter( 'WooNotify_notif_settings', function ( $settings ) { return apply_filters( 'whatsApp_notif_settings_settings', $settings ); }, 10, 1 ); add_filter( 'WooNotify_settings_fields', function ( $settings_fields ) { return apply_filters( 'persianwoowhatsApp_settings_section_content', $settings_fields ); }, 10, 1 ); add_filter( 'WooNotify_shortcodes_list', function ( $shortcodes ) { return apply_filters( 'woonotify_whatsApp_shortcode_list', $shortcodes ); }, 10, 1 ); add_filter( 'WooNotify_order_whatsApp_body_before_replace', function ( $content, $shortcodes, $shortcodes_values, $order_id, $order, $product_ids ) { return apply_filters( 'woonotify_whatsApp_content_replace', $content, $shortcodes, $shortcodes_values, $order_id, $order, $product_ids ); }, 10, 6 ); add_filter( 'WooNotify_order_whatsApp_body_after_replace', function ( $content, $order_id, $order, $product_ids ) { return apply_filters( 'woonotify_whatsApp_content', $content, $order_id, $order, $product_ids ); }, 10, 4 ); } private function actions() { add_action( 'WooNotify_before_product_newsletter_form', function ( $product ) { do_action( 'ps_woo_whatsApp_before_notif_form', $product ); }, 10, 1 ); add_action( 'WooNotify_after_product_newsletter_form', function ( $product ) { do_action( 'ps_woo_whatsApp_after_notif_form', $product ); }, 10, 1 ); add_action( 'WooNotify_product_whatsApp_tab', function ( $product_id ) { do_action( 'woocommerce_product_whatsApp', $product_id ); }, 10, 1 ); if ( class_exists( 'WaMessenger_whatsApp_Settings' ) ) { if ( method_exists( 'WaMessenger_whatsApp_Settings', 'settingSections' ) ) { $sections = WaMessenger_whatsApp_Settings::settingSections(); $form_ids = wp_list_pluck( $sections, 'id' ); foreach ( (array) $form_ids as $form_id ) { add_action( 'WooNotify_settings_form_top_' . $form_id, function ( $form ) use ( $form_id ) { do_action( 'ps_woo_whatsApp_form_top_' . $form_id, $form ); }, 10, 1 ); add_action( 'WooNotify_settings_form_bottom_' . $form_id, function ( $form ) use ( $form_id ) { do_action( 'ps_woo_whatsApp_form_bottom_' . $form_id, $form ); }, 10, 1 ); add_action( 'WooNotify_settings_form_submit_' . $form_id, function ( $form ) use ( $form_id ) { echo '
'; do_action( 'ps_woo_whatsApp_form_submit_' . $form_id, $form ); echo '
'; }, 10, 1 ); } } } } } new WaMessenger_whatsApp_Deprecated_Hooks(); global $WooNotify, $persianwoowhatsApp, $persianwoohelper; if ( ! empty( $WooNotify ) ) { $persianwoowhatsApp = $persianwoohelper = $WooNotify; }