Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Default form-coupon.php template looks like this:

    <?php
    /**
     * Checkout coupon form
     *
     * @author      WooThemes
     * @package     WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $woocommerce;
    
    if ( ! WC()->cart->coupons_enabled() )
        return;
    
    $info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) );
    $info_message .= ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>';
    wc_print_notice( $info_message, 'notice' );
    ?>
    
    <form class="checkout_coupon" method="post" style="display:none">
    
        <p class="form-row form-row-first">
            <input type="text" name="coupon_code" class="input-text" placeholder="<?php _e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
        </p>
    
        <p class="form-row form-row-last">
            <input type="submit" class="button" name="apply_coupon" value="<?php _e( 'Apply Coupon', 'woocommerce' ); ?>" />
        </p>
    
        <div class="clear"></div>
    </form>

    Try first renaming/deleting your custom form-coupon.php to see if the default one works, if so you know it’s template issue so use the default one with appropriate changes…

    After playing around a bit I’ve noticed that you could do this in your template:

    global $AWD_facebook;
    $AWD_facebook->uid;

    This is much better approach since you already have access to AWD object…

    I suppose you could use get_user_meta()

    http://codex.ww.wp.xz.cn/Function_Reference/get_user_meta

    $fb_uid = get_user_meta($user_id, 'fb_uid', true);

    I hope this helps…

    p.s. I’m not sure if there is a way to get this from session….

Viewing 3 replies - 1 through 3 (of 3 total)