Commit 4355de06 authored by Varun Sridharan's avatar Varun Sridharan

fixs

Filter By Order Status
And Other Features
bug fixed shortcode display
parent 6d2cfd05
This diff is collapsed.
......@@ -151,7 +151,7 @@ class WooCommerce_Quick_Donation_Admin {
$args['meta_query'][]['value'] = $_GET['dproj'];
$args['meta_query'][]['compare'] = '=';
}
if(isset($_GET['order_status'])){ $args['post_status'] = $_GET['order_status'];}
$wp_query = new WP_Query($args);
require('wp-donation-listing-table.php');
tt_render_list_page($wp_query);
......
......@@ -76,12 +76,13 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
set_current_screen( 'shop_order' );
parent::__construct( array(
'plural' => 'posts',
'plural' => 'Donations',
'screen' => get_current_screen(),
) );
$this->screen->post_type = 'shop_order';
//$this->screen->id = 'shop_order';
$post_type = $this->screen->post_type;
$post_type_object = get_post_type_object( $post_type );
$this->user_posts_count = 0;
......@@ -274,7 +275,7 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] )
$class = ' class="current"';
$status_links[$status_name] = "<a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
$status_links[$status_name] = "<a href='edit.php?post_type=wcqd_project&amp;page=wc_qd_orders&amp;order_status=$status_name'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
}
if ( ! empty( $this->sticky_posts_count ) ) {
......
......@@ -26,18 +26,29 @@ class WooCommerce_Quick_Donation_Shortcode {
$settings = shortcode_atts( array(
'type' => 'select',
'grouped' => false,
'show_erros' => true,
), $settings );
$donation_box = WC_QD()->f()->generate_donation_selbox($settings['grouped'],$settings['type']);
$donation_price = WC_QD()->f()->generate_price_box();
$currency = get_woocommerce_currency_symbol();
$return_value = '';
$messages = '';
if($settings['show_erros']){
ob_start();
wc_print_notices();
$messages .= ob_get_clean();
ob_flush();
}
ob_start();
do_action('wc_quick_donation_before_doantion_form',$return_value , $settings['type'],$settings['grouped']);
WC_QD()->f()->load_template('donation-form.php',WC_QD_TEMPLATE);
do_action('wc_quick_donation_after_doantion_form',$return_value , $settings['type'],$settings['grouped']);
$messages .= ob_get_clean();
return ob_get_clean();
return $messages;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment