Hide Cart Price Button

/** * Hide Price & Add to Cart for Non Logged in Users for Specific Products */ function is_non_purchasable_products_for_visitors( $product ) { $not_purchasable_products = array( 23, 22 ); // Replace with Products ID you want to set as non purchasable…Continue reading

run on payment page

// This code runs every time the page is opened/reloaded $visits = 1; if (isset($_COOKIE[‘visits’])) { $visits = (int)$_COOKIE[‘visits’] + 1; } setcookie(‘visits’, $visits, time() + (86400 ), “/”); // Cookie lasts 1 days if ( ! defined( ‘EMAIL_SENT_PAGE_410’ )…Continue reading

CLI_Extension – Gravity Flow CLI Extension v2.0

/** * Gravity Flow CLI Extension v2.0 * * Verified against official Gravity Flow API documentation: * – Orchestration API: https://docs.gravityflow.io/the-workflow-orchestration-api/ * – Step Framework: https://docs.gravityflow.io/the-workflow-step-framework/ * – REST API v2: https://docs.gravityflow.io/the-workflow-web-rest-api/ * * INSTALLATION: * Place this file at:…Continue reading

CLI_Extension -Uncanny Automator CLI Extension v3.0

/** * Uncanny Automator CLI Extension v3.0 * * INSTALLATION: * Place this file at: wp-content/mu-plugins/automator-cli-extension.php * Or add via WPCode snippets (set to run everywhere) * * COMMANDS: * wp automator list-triggers [–integration=] [–format=] * wp automator list-actions [–integration=]…Continue reading

Redirect for old PG profile pages to new PG profile pages

/** * Redirect old peoplegroups.org ASPX URLs * – groupdetails.aspx?peid=X → /people_groups/PG00000X * – All other .aspx files → homepage */ add_action(‘init’, function() { // Check if this is a request for any .aspx file if (isset($_SERVER[‘REQUEST_URI’]) && strpos($_SERVER[‘REQUEST_URI’], ‘.aspx’)…Continue reading

Redirect for OLD pg.org site links – PG profile

/** * Redirect old peoplegroups.org URLs with query strings to new format * Example: groupdetails.aspx?peid=47185 → /people_groups/PG047185 */ // Check if this is a request for groupdetails.aspx if (isset($_SERVER[‘REQUEST_URI’]) && strpos($_SERVER[‘REQUEST_URI’], ‘/explore/groupdetails.aspx’) !== false) { // Check if peid parameter…Continue reading