Sending Form Fields as Smart Tags to Square

/** * Send the email address to Square * * @link https://wpforms.com/developers/how-to-send-the-email-address-to-square-with-wpfoms/ */ function wpf_dev_process_smart_tags_in_payment_description( $args, $process ) { if ( isset( $args[ ‘note’ ] ) ) { $note = apply_filters( ‘wpforms_process_smart_tags’, $args[ ‘note’ ], $process->form_data, $process->fields, 0 ); //…Continue reading

WooCommerce – Custom Formatted Billing Address

// error_log(‘[icInitializeCustomBillingAddress] START’); function icCustomBillingAddressOrder($address, $wc_order) { $company_name = get_user_meta($wc_order->user_id, ‘billing_company’, true); // error_log(‘company_name:’ . print_r($company_name, true)); $address = array( ‘first_name’ => $wc_order->billing_first_name, ‘last_name’ => $wc_order->billing_last_name, ‘company’ => $company_name, ‘address_1’ => $wc_order->billing_address_1, ‘address_2’ => $wc_order->billing_address_2, ‘city’ => $wc_order->billing_city, ‘state’ =>…Continue reading

Print Invoice – Hooks for Printing

error_log(‘[icInitializePrintInvoice] START’); function icInsertCSSPrintInvoice() { error_log(‘[icInsertCSSPrintInvoice] START’); $output = do_shortcode(”); error_log(‘[icInsertCSSPrintInvoice] $output:’ . $output); echo $output; } function icInitializePrintInvoice() { add_action(‘wcdn_head’, ‘icInsertCSSPrintInvoice’, 20); } add_action(‘plugins_loaded’, ‘icInitializePrintInvoice’);Continue reading

Change Editor Default Image Size

add_filter( ‘block_editor_settings_all’, function ( $settings, $context ) { // The default image size when added in the block editor. $settings[‘imageDefaultSize’] = ‘full’; return $settings; }, 10, 2 );Continue reading

Disable Inspector Tabs

add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading

Disable Openverse

add_filter( ‘block_editor_settings_all’, function( $settings, $context ) { $settings[‘enableOpenverseMediaCategory’] = false; return $settings; }, 10, 2 );Continue reading

Disable Template Editor

add_action( ‘current_screen’, function () { $screen = get_current_screen(); // Add other custom post types here as needed. if ( in_array( $screen->id, array( ‘post’, ‘page’ ) ) ) { remove_theme_support( ‘block-templates’ ); } } );Continue reading

Heartbeat Setting

// Add a new setting in wp-admin > Settings > General add_action( ‘admin_init’, function() { register_setting( ‘general’, ‘custom_heartbeat_interval’, ‘intval’ ); add_settings_field( ‘custom_heartbeat_interval’, ‘Heartbeat Interval’, function() { $interval = get_option( ‘custom_heartbeat_interval’, 120 ); echo “ seconds”; }, ‘general’ ); }); add_filter(…Continue reading