Update Donation Summary

add_filter(‘charitable_donation_summary’, ‘charitable_custom_donation_summary’, 10, 4 ); /** * Custom donation summary output. * * @param string $ret The default donation summary output. * @param Charitable_Campaign $campaign The campaign object. * @param int $amount The amount raised. * @param int $goal The…Continue reading

Modern CSS Reset

/* 1. Use a more-intuitive box-sizing model */ *, *::before, *::after { box-sizing: border-box; } /* 2. Remove default margin */ * { margin: 0; } body { /* 3. Add accessible line-height */ line-height: 1.5; /* 4. Improve text…Continue reading

Prevent Duplicate Purchases

function pw_edd_prevent_duplicate_purchase( $valid_data, $posted ) { $cart_contents = edd_get_cart_contents(); foreach( $cart_contents as $item ) { if( edd_has_user_purchased( get_current_user_id(), $item[‘id’] ) ) { edd_set_error( ‘duplicate_item’, ‘You have already purchased this item so may not purchase it again’ ); } } }…Continue reading

muestra

http://bucketvisualizadorvplant.s3-website-us-east-1.amazonaws.com/practicas/Bombas-centr%C3%ADfugasContinue reading

Approving User Account After Completed PayPal Payment

/** * Approve user after PayPal payment status is Complete * * @link https://wpforms.com/developers/how-to-approve-a-user-after-a-paypal-payment/ */ function wpf_dev_activate_user_after_paypal_complete( $fields, $form_data, $payment_id, $data ){ // Add the field ID for the user’s account email $email_field = 3; // Stop editing $user =…Continue reading