Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter mtrehearn

    (@mtrehearn)

    Hi James Huff,

    Thank you for your informative yet if not slightly threatening response. Whilst I certainly don’t want to appear on people’s “radar” the report topic function is not particularly user friendly. Whilst I appreciate the need for a report topic function, as a user who does not often use these forums I assumed that after clicking that function you would then be taken to another screen where you could perhaps detail why you were reporting the topic (for example in this case where I have been ignored for a number of months on a topic the author marked as resolved when it wasn’t) – much to my error instead it simply reports the topic with no way to retract it if needs be.

    Please ignore me reporting the topic.

    Thank you.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Could someone please take a look at this? Until I have the GDPR bit sorted it cannot be used on my site as it does not record consent to keep information.

    Thank you.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    I have been a bit busy but have finally been able to come back to this and I now have it outputting giving me the custom fields in the export section but under the give_form_terms I get a “No” and under the give_agree_to_terms I get “1”. I am only using the one donation form and I use the global Terms and Conditions settings. Is there any way to change your code a little to title the column “Consent” and then output the text that I have set under the “Agree to Terms Label” on the settings page?

    Thanks again for your help.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Thank you for your help.

    Appreciate this.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Just wondered if you had a chance to look at my last note please?

    Thank you.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Thank you for looking in to this.

    I have tried every way I can think of – just your code in my functions.php, using the global and custom terms on the plugin etc. – and I just can’t see what’s going wrong / what I’m missing.

    As a work around is there any way to add a column to the end of the output csv titled “consent” and just input the text I want (I.e. my wording for the “I accept the terms” text) as plain text in the row below?

    Thanks again for the help – I appreciate everything you are trying to do 🙂

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Just wondered if you had a chance to look at this at all please?

    Thank you.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Thanks for the reply. I have done a couple of dummy offline donations on an existing form I have and marked them as “complete” but when I go to export the csv (the first / top option) then there is no option for custom fields and the csv stops at IP address.

    Thanks for the help.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Thanks for the reply.

    There doesn’t appear to be any issues with code being thrown up but there’s no option for “Custom Fields” i can see when i go to download the CSV.

    Thanks for the help.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Just wondered if you had a chance to look at this at all yet please?

    Thank you.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi there,

    This is what is in my child theme’s functions.php. Obviously just ignore the first couple of functions / filters.

    Thanks,

    <?php

    add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );

    function enqueue_parent_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
    }

    // changes the “select options” text. Forget who to give credit to for this.
    add_filter( ‘woocommerce_product_add_to_cart_text’, function( $text ) {
    global $product;
    if ( $product->is_type( ‘variable’ ) ) {
    $text = $product->is_purchasable() ? __( ‘Options’, ‘woocommerce’ ) : __( ‘Read more’, ‘woocommerce’ );
    }
    return $text;
    }, 10 );

    /**
    * remove add to cart buttons on shop archive page
    */

    add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘replacing_add_to_cart_button’, 10, 2 );
    function replacing_add_to_cart_button( $button, $product ) {
    if ( $product->is_type( ‘simple’ ) ) {
    $button_text = __(“View”, “woocommerce”);
    $button = ‘get_permalink() . ‘”>’ .
    $button_text . ‘
    ‘;
    }
    return $button;
    }

    /**
    4 * Add Terms Agreement text and consent to Donation Meta
    5 * NOTE: This is then used in the Give CSV Export to show consent.
    6 *
    7 */

    /**
    10 * Output Terms in hidden textarea for saving
    11 *
    12 * @param $form_id
    13 */
    function custom_givewp_output_terms_for_saving($form_id) {

    $formmeta = get_post_meta($form_id);
    $terms_enabled = $formmeta[‘_give_terms_option’][0];
    $global = give_get_settings();

    switch($terms_enabled) {
    case ‘enabled’: $terms = $formmeta[‘_give_agree_text’][0]; break;
    case ‘global’: $terms = $global[‘agreement_text’]; break;
    default: return;
    }

    if ( $terms_enabled!==’disabled’ ) {
    ?>
    <textarea class=”give-textarea” name=”give_form_terms” id=”give_form_terms” aria-hidden=”true”
    style=”display:none;opacity: 0; height: 0; border: 0 !important;” readonly disabled><?php echo $terms; ?></textarea>
    <?php
    }

    }

    add_action(‘give_after_donation_levels’, ‘custom_givewp_output_terms_for_saving’);

    /**
    39 * Save Terms and Terms Agreement in to donation meta
    40 *
    41 * @param $form_id
    42 */

    function custom_give_save_terms_agreement_to_donation_paymentmeta( $payment_id ) {
    global $post;

    if ( isset($_POST[‘give_agree_to_terms’]) ) {
    $agreed = wp_strip_all_tags( $_POST[‘give_agree_to_terms’], true );
    $terms = wp_strip_all_tags( $_POST[‘give_form_terms’], true );
    $pretty_terms = ( $terms == 1 ) ? __(‘Yes’, ‘give’) : __(‘No’,’give’);

    give_update_payment_meta( $payment_id, ‘give_form_terms’, $pretty_terms );
    give_update_payment_meta( $payment_id, ‘give_agree_to_terms’, $agreed );

    }
    }

    add_action(‘give_insert_payment’, ‘custom_give_save_terms_agreement_to_donation_paymentmeta’);

    ?>

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    1. Yeh it was a fresh install of the plugin so not sure what happened there. I have added it to the functions.php in my child theme now instead but it has an issue with the “{” on line 33 just above the code:

    add_action(‘give_after_donation_levels’, ‘custom_givewp_output_terms_for_saving’);

    2. That makes a lot of sense and would be helpful for others looking for a similar solution.

    3. That’s ok – its not a big problem – the work around for now is to download the CSV file and manually delete the details of other donors to prevent accidentally leaking their details before sending to the donor that requested the data we hold on them.

    Thanks again for the help.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Sorry based in UK so only just seen this.

    Thank you for your help. My Custom Functions plugin doesn’t agree with my site for some reason and just freezes so trying to find other ways to implement code without hacking up my functions.php file.

    What I was really after is just adding a column at the end that is titled something like “Consent” where it will add the “I agree to the terms text”. For ease this doesn’t have to take the value from the settings page but can just be typed for now. Any ideas how I can do that and add a column?

    Also I wondered if there was a way to export the data of just one donor that can be found perhaps using email address rather than a number of donors based on a date range? Reason being is if I want to send the csv file for a donor if they request their details I’ll have to manually go in and delete all other details for donors within that date range. Not a big issue as it’s something that will rarely come up but just curious if it’s do-able?

    Thanks again for the help.

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Don’t worry about the above extra sections – managed to get something working.

    Thanks,

    Thread Starter mtrehearn

    (@mtrehearn)

    Hi,

    Still not been able to figure out the W3 issue I’m afraid so have had to disable W3 for now.

    Not sure if it’s possible but I wanted to add another 2 sections to the tools form for “request rectification” and “complaints” where I can just use a contact form 7 submission form for people to obviously complain or ask for details to be rectified/changed any ideas how I can add the extra sections?

    Thanks.

Viewing 15 replies - 1 through 15 (of 21 total)