Skip to content

Instantly share code, notes, and snippets.

@sheerazchand
sheerazchand / gist:3ec7276aa7d5093856bc034f433bdff2
Created April 3, 2026 15:10
jennifer-azzopardi-email-signatue.html
<a href="https://azcomcommercial.com" target="_blank" style="text-decoration:none; border:0;">
<img
src="https://azcomcommercial.com/jennifer-azzopardi.png"
alt="Jennifer Azzopardi"
border="0"
style="display:block; border:0; outline:none; text-decoration:none;"
>
</a>
@sheerazchand
sheerazchand / my_pmpro_members_only_woocommerce_shop.php
Created July 20, 2022 01:41 — forked from strangerstudios/my_pmpro_members_only_woocommerce_shop.php
Make the entire WooCommerce shop only available to Members of Level IDs 1 and 2.
/*
Requires Paid Memberships Pro (https://wordpress.org/plugins/paid-memberships-pro/) and
WooCommerce (https://wordpress.org/plugins/woocommerce/)
Update line 13 with the membership level IDs to allow into the store.
*/
function my_pmpro_members_only_woocommerce_shop() {
global $current_user;
if (
(
@sheerazchand
sheerazchand / gist:596711c93c570068e46928a59086e5f0
Created May 30, 2022 22:30 — forked from strangerstudios/gist:4027538
Hide the confirm email and confirm password fields from the Paid Memberships Pro checkout page.
/*
Don't show confirm password or email fields on the checkout page.
Add this code to your active theme's functions.php or a custom plugin.
*/
add_filter("pmpro_checkout_confirm_password", "__return_false");
add_filter("pmpro_checkout_confirm_email", "__return_false");
@sheerazchand
sheerazchand / collection.liquid
Created May 29, 2022 14:39 — forked from Lysindr/collection.liquid
Shopify AJAX filter collection page with TAGS
<div class="collection__main">
<!-- COLLECTION SIDEBAR -->
{%- capture categories -%}
{%- for tag in collections[collection.handle].tags -%}
{%- if tag contains 'categories' -%}
{%- assign tag_patterns = tag | split: '_' -%}
<li class="collection-sidebar__filter-item main-filter" data-tag="{{ tag | handle }}">{{ tag_patterns[1] }}</li>
{%- endif -%}
{%- endfor -%}
@sheerazchand
sheerazchand / functions.php
Created May 29, 2022 00:49 — forked from paaljoachim/functions.php
Tutorial: WooCommerce Checkout: Add multiple custom fields to billing area. This code adds priority placement of field. Shows the custom fields in the backend Order Details screen and in e-mails to the admin and customer. I have also adjusted the checkbox field to give a text result instead of a value of 1. Checkbox is also pre-selected.
/* --------- Adds custom fields using filters. ------
The below custom fields shows various types one can use.
It is then displayed in the backend Order Details page and in admin and customer e-mails.
Checkboxes by default result only show the number 1 when clicked. I have added code so that when the a checkbox is clicked it will
show text such as On and Yes. Checkbox is also pre-selected.
Tutorial: https://easywebdesigntutorials.com/woocommerce-modifying-the-checkout-page/
*/
// Initial inspiration: https://businessbloomer.com/woocommerce-add-shipping-phone-checkout/
// My Custom Fields
@sheerazchand
sheerazchand / my_custom_export_pmpro.php
Created February 17, 2022 21:37 — forked from andrewlimaza/my_custom_export_pmpro.php
Choose which fields get exported to Members List CSV Paid Memberships Pro
<?php
//Add the function below to your PMPro Customizations plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function filter_my_memberlist_export_columns( $columns ){
/**
* Comment out which columns you don't want to be exported to your memberlist.
*/
$columns = array(
@sheerazchand
sheerazchand / my_gettext_pmpro_mailchimp.php
Created January 17, 2022 21:03 — forked from strangerstudios/my_gettext_pmpro_mailchimp.php
Change wording in PMPro MailChimp Opt In Box
/*
Change wording in PMPro MailChimp Opt In Box
Add this code to your active theme's functions.php or a custom plugin.
Change the $translated_text = lines to the text you want.
*/
function my_gettext_pmpro_mailchimp($translated_text, $text, $domain)
{
if($domain == "pmpro" && $text == "Join one or more of our mailing lists.")
$translated_text = "Join one or more of our newsletters.";
elseif($domain == "pmpro" && $text == "Join our mailing list.")
@sheerazchand
sheerazchand / my_pmprorh_init_user_avatar.php
Created January 13, 2022 19:40 — forked from kimcoleman/my_pmprorh_init_user_avatar.php
Allow members to upload their avatar using a Register Helper field during checkout or on the Member Profile Edit page.
<?php
/*
* Allow members to upload their avatar using a Register Helper field during checkout or on the Member Profile Edit page.
*
* Requires: Paid Memberships Pro, Register Helper Add On.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/