PATH:
home
/
lab2454c
/
caimegroup.com
/
wp-content
/
themes
/
hello-theme-child-master
/
myaccount
<?php global $wpdb; ?> <div class="ur-frontend-form login" id="ur-frontend-form"> <div class="ur-form-row"> <div class="ur-form-grid"> <?php if(!empty($message) && $message == 'success'){?> <div class="user-registration-message"><?php esc_html_e('Your kyoto unit has been added successfully!', 'hello-elementor-child'); ?></div> <?php }?> <?php if(!empty($message) && $message == 'pay-success'){?> <div class="user-registration-message"><?php esc_html_e('You have successfully purchased the kyoto unit!', 'hello-elementor-child'); ?></div> <?php }?> <?php printf(wp_kses_post( __("<a href='%s' class='btn__add__kyoto__unit'>Click here</a> to sell your unit", 'hello-elementor-child')),esc_url(site_url().'/my-account/sell-kyoto-unit/'));?> <table> <tr> <td><strong><?php esc_html_e( 'Publish Date', 'hello-elementor-child' ); ?></strong></td> <td><strong><?php esc_html_e( 'User', 'hello-elementor-child' ); ?></strong></td> <td><strong><?php esc_html_e( 'Credits', 'hello-elementor-child' ); ?></strong></td> <td><strong><?php esc_html_e( 'Total Price', 'hello-elementor-child' ); ?></strong></td> <td><strong>#</strong></td> </tr> <?php if ( $selling_units->have_posts() ) { while ( $selling_units->have_posts() ) { $selling_units->the_post(); $product = wc_get_product(get_the_ID()); $unit_creator = get_post_meta($product->get_id(), '_unit_creator', true); $unit_creator_remaining_credit = get_post_meta($product->get_id(), '_unit_creator_remaining_credit', true); $unit_creator_obj = get_user_by('id', $unit_creator); $pay_now_url = add_query_arg(['pay-unit-price' => $product->get_id()], wc_hec_get_checkout_url()); $order_exists = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}woocommerce_order_items as order_items LEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id WHERE order_item_meta.meta_key = '_product_id' AND order_item_meta.meta_value = %d", $product->get_id() ) ); ?> <tr> <td><?php echo get_the_date();?></td> <td><?php echo '@'.$unit_creator_obj->user_login;?></td> <td><?php echo $unit_creator_remaining_credit;?></td> <td><?php echo wp_kses_post( $product->get_price_html());?></td> <td> <?php if($order_exists > 0){?> <?php esc_html_e( 'Sold', 'hello-elementor-child' ); ?> <?php }elseif($current_user->ID != $unit_creator){?> <a href="<?php echo $pay_now_url;?>" class="user-registration-Button button"><?php esc_html_e( 'Buy', 'hello-elementor-child' ); ?></a> <?php }?> </td> </tr> <?php } } wp_reset_postdata(); ?> </table> </div> </div> </div>
[+]
..
[-] kyoto-unit.php
[edit]
[-] sell-kyoto-unit.php
[edit]