This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get plan restriction rules if we have an ID, could be used in member area for example | |
$plan = wc_memberships_get_membership_plan( $plan_id ); | |
$product_rules = $plan->get_product_restriction_rules(); | |
foreach ( $product_rules as $rule ) { | |
// get the ids of restricted items from the rules | |
$restricted_items = $rule->get_object_ids(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WebView | |
(function () { | |
var eventHandlers = {}; | |
var locationHash = ''; | |
try { | |
locationHash = location.hash.toString(); | |
} catch (e) {} | |
var initParams = urlParseHashParams(locationHash); |