/** * Add login buttons to the Product Reviews Pro login modal */ function sv_wc_social_login_add_buttons_prpro() { // only do this on the product pages if (is_product() && function_exists('woocommerce_social_login_buttons')) { woocommerce_social_login_buttons(home_url(add_query_arg(array())) . '#tab-reviews#comment-1'); } }
/** * Add social login buttons to the WC Memberships "restricted content" messages * Hooks into several filters to add login buttons to all message types * * @param string $message the message content * @param int $post_id the post or product ID for the restricted post object * @return string - the updated message content */ function sv_wc_memberships_social_login_buttons_notice($message, $post_id) { // you could limit login buttons to certain posts or post types using the post ID // e.g., if ( 'projects' === get_post_type( $post_id ) ) { // only output buttons for project restriction messages } // or by choosing which filters you hook this function into if (function_exists('woocommerce_social_login_buttons')) { add_filter('pre_option_wc_social_login_text', '__return_empty_string'); ob_start(); woocommerce_social_login_buttons(); return $message . ob_get_clean(); } return $message; }
/** * Render the social login widget * * @since 1.0 * @see WP_Widget::widget() * @param array $args widget arguments * @param array $instance saved values from database */ public function widget($args, $instance) { $providers = wc_social_login()->get_available_providers(); // Bail if no providers are available if (empty($providers)) { return; } // get the widget configuration $title = $instance['title']; echo $args['before_widget']; if ($title) { echo $args['before_title'] . $title . $args['after_title']; } woocommerce_social_login_buttons($instance['return_url']); echo $args['after_widget']; }
/** * Adds login buttons to the wp-login.php pages */ function sv_wc_social_login_add_buttons_wplogin() { // Displays login buttons to non-logged in users + redirect back to login woocommerce_social_login_buttons(); }
function add_wc_social_login_buttons_wplogin() { // Displays login buttons to non-logged in users + redirect back to login if (function_exists("woocommerce_social_login_buttons")) { woocommerce_social_login_buttons(); } }
/** * Add social login buttons to Sensei * * @since 1.1.0 */ public function add_buttons_to_sensei_login() { global $woothemes_sensei; if (isset($woothemes_sensei->settings->settings['my_course_page'])) { $return_url = get_permalink(absint($woothemes_sensei->settings->settings['my_course_page'])); } else { $return_url = wc_get_page_permalink('myaccount'); } woocommerce_social_login_buttons($return_url); }