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

Adding Transitions to Checkbox and Multiple Choice Selections

ul#wpforms-999-field_3 li label, ul#wpforms-999-field_27 li label { padding: 10px; transition: all ease 0.3s; background: linear-gradient(to right, #e27730 50%, #cd631d 50%); background-size: 200% 100%; background-position: left bottom; color: white; } ul#wpforms-999-field_3 li.wpforms-selected label, ul#wpforms-999-field_3 li label:hover, ul#wpforms-999-field_27 li.wpforms-selected label, ul#wpforms-999-field_27 li…Continue reading