Skip to content

Instantly share code, notes, and snippets.

View AndresCarignano's full-sized avatar

AndresCarignano

View GitHub Profile
@Crocoblock
Crocoblock / get-related.md
Last active May 30, 2024 07:30
Get JetEngine Related Items programmatically / Update related items / Get/Update relation meta
@bekarice
bekarice / wc-memberships-role-changes-handler.php
Created October 5, 2015 01:45
WooCommerce Memberships: Trigger role changes for active <-> inactive membership status changes
<?php
/**
* Replaces the Site Member role with the Customer role when a membership becomes inactive
*
* @param \WC_User_Membership $user_membership the user's membership
* @param string $old_status the previous membership status
* @param string $new_status the new membership status
*/
function sv_update_user_role_with_membership( $user_membership, $old_status, $new_status ) {