HTG

[wpgetapi_endpoint api_id=’HomeToGo’ endpoint_id=’HTG’ debug=’false’]Continue reading

Remove plugin deactivation

// Remove plugin deactivation for all users except ‘rubberduckers’ function rubberduckers_disable_plugin_deactivation($actions, $plugin_file, $plugin_data, $context) { // Get the current user $current_user = wp_get_current_user(); // Check if the current user’s username is NOT ‘rubberduckers’ if ($current_user->user_login !== ‘rubberduckers’) { // List…Continue reading

Change Text For Minimum Donation Message

/* * */ function change_min_donation_text( $text, $amount ) { return ‘ ‘ . __( ‘The minimum donation for this campaign is ‘, ‘charitable’ ) . charitable_format_money( $amount, false, true ) . ‘. ‘; } add_filter( ‘charitable_donationa_amount_notice’, ‘change_min_donation_text’, 10, 2 );Continue reading

WP Simple Pay: Add Email Address to Payment Confirmation URL

add_action( ‘template_redirect’, function() { if ( ! function_exists( ‘\SimplePay\Core\Payments\Payment_Confirmation\get_confirmation_data’ ) ) { return; } $data = \SimplePay\Core\Payments\Payment_Confirmation\get_confirmation_data(); if ( empty( $data ) ) { return; } $customer = $data[‘customer’]; $email = $customer->email; if ( isset( $_GET[’email’] ) ) { return;…Continue reading

Create Additional Formats for the Date Field

/* Add additional formats for the Date field Date Picker. Original doc link: https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-field/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_date_field_formats( $formats ) { // Item key is JS date character – see https://flatpickr.js.org/formatting/ // Item value is in…Continue reading