Type: php
[DO NOT PUSH] Add Extra WPFusion User Meta Fields to Auto-Push on ‘Add’ or ‘Update’
function rd_watch_selected_wpf_meta_fields( $fields ) { $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key, add more rows as required…Continue reading
Remove Gift Aid “Title” Field From Donation Forms
add_filter( ‘charitable_default_donation_fields’, function( $fields ) { if ( isset( $fields[‘title’] ) ) { // Remove from the donation form entirely $fields[‘title’][‘donation_form’] = false; } return $fields; }, 20 );Continue reading
AffiliateWP – Create Referral from Gravity Forms Dropdown Field
Spreaker Automatic Sync
Register Podcast Meta Fields
Custom Fluent Forms REST submit route
add_action(‘fluentform/loaded’, function ($app) { $app->router->post(‘/test-submit’, function () use ($app) { try { $rawData = $app->request->get(‘data’); if (is_string($rawData)) { parse_str($rawData, $data); } elseif (is_array($rawData)) { $data = $rawData; } else { $data = []; } $data[‘_wp_http_referer’] = isset($data[‘_wp_http_referer’]) ? sanitize_url(urldecode($data[‘_wp_http_referer’])) :…Continue reading
Save Woo Shipping Zone ID as Meta Data
if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! class_exists( ‘WooCommerce’ ) || ! class_exists( ‘WC_Shipping_Zones’ ) ) { return; } if ( ! function_exists( ‘rd_get_order_shipping_zone_id’ ) ) { function rd_get_order_shipping_zone_id( $order ) { if (…Continue reading
YB Settings
function impBrandsArchive( $query ) { $query->set( ‘post_type’, [ ‘hot-tubs’, ‘swim-spas’, ‘saunas’ ] ); } add_action( ‘elementor/query/brands_archive’, ‘impBrandsArchive’ ); /** * Action: ‘rank_math/vars/register_extra_replacements’ – Allows adding extra variables. */ add_action( ‘rank_math/vars/register_extra_replacements’, function(){ rank_math_register_var_replacement( ‘dealer_currency’, [ ‘name’ => esc_html__( ‘Dealer Currency’, ‘rank-math’…Continue reading
AR iFrame Snippet 2.0
function impDisplayARWrapperIframe() { $post_id = get_the_ID(); $product_ar = get_post_meta($post_id, ‘product_ar_iframe’, true); if(!empty($product_ar)) { $html_code = ‘‘; } else { $product_ar = get_post_meta($post_id, ‘ar_code’, true); $html_code = ‘‘; } return $html_code; } add_shortcode(‘display-ar-wrapper-iframe’, ‘impDisplayARWrapperIframe’); function impDisplayARWrapperIframeMassagechairs() { $post_id = get_the_ID(); $product_ar…Continue reading