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 | |
if ( ! isset( $_GET['wpf_action'] ) ) { | |
exit(); | |
} | |
if ( ! defined( 'ABSPATH' ) ) { | |
// Normally ABSPATH isn't defined here, but this allows for overriding it with | |
// auto_prepend_file or by including this file via a bootstrap. |
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 | |
function store_additional_license_parameters( $response, $args, $license_id ) { | |
$data = array_map( 'sanitize_text_field', $_REQUEST ); | |
if ( $response['license'] == 'valid' ) { | |
$user = get_user_by( 'email', $response['customer_email'] ); |
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 | |
/** | |
* Utility function for getting any FooEvents attendees from a WooCommerce order | |
* @param WC_Order $order | |
* @return array Attendees | |
*/ | |
function get_foo_attendees_from_order( $order ) { | |
$attendees = array(); |
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 | |
/** | |
* Sends API calls non-blocking during login. | |
* | |
* This is useful if your CRM has a slow API, it will allow the user to log in | |
* without any noticable delay. However, if the API is offline or fails to process | |
* the request, no error will be logged and there will be no indication it failed. | |
* | |
* @param array $parsed_args The HTTP API request args. |
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 | |
/** | |
* | |
* This sometimes fixes the error "A valid URL was not provided." wen connecting to self | |
* hosted CRMs like Mautic, FluentCRM, or FunnelKit. | |
* | |
* @param array $args HTTP request arguments. | |
* @param string $url The request URL. | |
* @return array HTTP request arguments. | |
*/ |
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 | |
/* | |
Plugin Name: WPF All Sites | |
Plugin URI: verygoodplugins.com | |
Description: Stores log of all sites that call home looking for updates | |
Version: 1.0 | |
Author: vergoodplugins | |
Author URI: verygoodplugins.com | |
License: |
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 | |
function wpf_dont_sync_free_orders( $order_args ) { | |
if ( empty( $order_args['total'] ) ) { | |
return false; | |
} | |
return $order_args; | |
} |
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 | |
function add_field_keys_to_names( $fields ) { | |
foreach ( $fields as $i => $category ) { | |
foreach ( $category as $key => $label ) { | |
$fields[ $i ][ $key ] = $label .= ' (' . $key . ')'; | |
} | |
} |
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 | |
/** | |
* Inherits access rules and redirects from ActiveMember360 for posts and pages. | |
* | |
* @param array $settings The WP Fusion settings on the post. | |
* @param WP_Post|int $post_id The post or post ID. | |
* @return array The settings. | |
*/ | |
function inherit_am360_access_rules( $settings, $post_id ) { |
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
import openai | |
import requests | |
import re | |
import json | |
openai.api_key = "X" | |
# Define WooCommerce credentials. | |
site_url = "https://yoursite.com/" |
NewerOlder