Skip to content

Instantly share code, notes, and snippets.

@slaFFik
slaFFik / wpms-smtp-disable-ssl-verify.php
Last active January 23, 2024 18:35
WP Mail SMTP: when using SMTP mailer - disable SSL verify on PHP 5.6+
<?php
add_filter('wp_mail_smtp_custom_options', function( $phpmailer ) {
$phpmailer->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
@thenbrent
thenbrent / wcs-remove-my-subscriptions-buttons.php
Last active October 19, 2023 06:22
Remove any given button from the My Subscriptions table on the My Account page. By default, only the "Change Payment Method" button is removed, but you can uncomment additional actions to remove those buttons also.
<?php
/**
* Plugin Name: Remove Subscription Action Buttons from My Account
* Plugin URI: https://gist.github.com/thenbrent/8851287/
* Description: Remove any given button from the <a href="http://docs.woothemes.com/document/subscriptions/customers-view/#section-2">My Subscriptions</a> table on the My Account page. By default, only the "Change Payment Method" button is removed, but you can uncomment additional actions to remove those buttons also.
* Author: Brent Shepherd
* Author URI:
* Version: 2.0
*/
@gmazzap
gmazzap / revoke-profile-access.php
Last active February 6, 2020 18:50
Simple WordPress plugin that allow administrators to revoke access to profile to some users. Wrote to anwer a question on WPSE: http://wordpress.stackexchange.com/q/141743/35541
<?php
/**
* Plugin Name: Revoke Profile Access
* Description: Allow administrators to revoke access to profile to some users
* Plugin URI: http://wordpress.stackexchange.com/q/141743/
* Author: G. M.
* Author URI: http://wordpress.stackexchange.com/users/35541/g-m
* License: GPLv2
*
*/