Register Custom AutomateWoo Rule “Customer – Klaviyo Tags”

add_filter( ‘automatewoo/rules/includes’, ‘rd_aw_register_customer_klaviyo_tags_rule’ ); /** * Register custom AutomateWoo customer rules. * * @param array $rules AutomateWoo rules. * @return array */ function rd_aw_register_customer_klaviyo_tags_rule( $rules ) { if ( ! class_exists( ‘\AutomateWoo\Rules\Rule’ ) ) { return $rules; } if (…Continue reading

Register Custom AutomateWoo Rule “Order – Is Customer’s Most Recent”

add_filter( ‘automatewoo/rules/includes’, ‘rd_aw_register_order_is_customers_most_recent_rule’ ); /** * Register custom AutomateWoo rules. * * @param array $rules AutomateWoo rules. * @return array */ function rd_aw_register_order_is_customers_most_recent_rule( $rules ) { if ( ! class_exists( ‘\AutomateWoo\Rules\Abstract_Bool’ ) || ! function_exists( ‘wc_get_orders’ ) ) { return…Continue reading

Disable Password Reset

// Disable Password Reset Functionality function disable_password_reset() { return false; } add_filter(‘allow_password_reset’, ‘disable_password_reset’); // Remove “Lost Your Password?” Link function remove_lostpassword_text($text) { if ($text == ‘Lost your password?’) { $text = ”; } return $text; } add_filter(‘gettext’, ‘remove_lostpassword_text’); // Block…Continue reading

Restrict Dashboard Access

function restrict_dashboard_access() { // Allow AJAX requests to proceed if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) { return; } // Check if user is not an administrator if ( ! current_user_can( ‘administrator’ ) && is_admin() ) { wp_redirect( home_url()…Continue reading