Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter iykyvic

    (@iykyvic)

    really sorry for this, and yes I was part promoting and also part contributing, writing other plugins, maybe i will do something on this one later. I could bring down this post if needed. Thank you.

    iykyvic

    (@iykyvic)

    trying to filter the string in my functions.php file brought up the function already declared in wordpress includes, so i used a work-around.

    In my case all I just wanted was to re-style the avatar, as I was using the same call get_avatar() in my site header menu and in-page(two calls on the same page). each call required different styles to them.

    To solve this I styled the first call using the already existing css class photo(you can also use the avatar, avatar-default or avatar-96 classes).

    i used javascript to replace the class, width and height property of the second call see code below.

    <div id="text-center" class="text-center">
    						<?php echo get_avatar( $current_user->ID ); ?>
    </div>
    <script>
    document.getElementById("text-center").getElementsByTagName('img')[0].className = "userdp";
    document.getElementById("text-center").getElementsByTagName('img')[0].width = "130";
    document.getElementById("text-center").getElementsByTagName('img')[0].height = "80";
    </script>

    you did not declare woocommerce globals

    `/**
    * Process the payment and return the result
    **/
    function process_payment( $order_id ) {
    global $woocommerce;
    $order = wc_get_order( $order_id );
    `

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