Skip to content

Instantly share code, notes, and snippets.

View PhouvanhKCSV's full-sized avatar
🌴
On vacation

Phouvanh KCSV PhouvanhKCSV

🌴
On vacation
View GitHub Profile
@PhouvanhKCSV
PhouvanhKCSV / active-woocommerce-subscription.php
Created April 11, 2017 09:44 — forked from UltimateWoo/active-woocommerce-subscription.php
Check if the current user has an active WooCommerce subscription
<?php
/**
* Check if the current user has an active subscription.
* Redirect the user if no active subscription and the current post is a singule forum.
* This code should not be copied and pasted as is. It is only to demonstrate the wcs_user_has_subscription() function.
*
* wcs_user_has_subscription( $user_id = 0, $product_id = '', $status = 'any' )
* @param int (optional) The ID of a user in the store. If left empty, the current user's ID will be used.
* @param int (optional) The ID of a product in the store. If left empty, the function will see if the user has any subscription.
@PhouvanhKCSV
PhouvanhKCSV / soulaxay-inventory.skema
Last active March 28, 2016 18:11
the description for this gist
[{"name":"userId","color":"Blue","position":{"x":80,"y":83},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"id","type":"increments","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c30","order":0},{"name":"firstName","type":"string","length":"50","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":true,"un":false,"fillable":true,"guarded":false,"visible":true,"hidden":false,"colid":"c38","order":1}],"relation":[],"seeding":[]}]