Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce-quick-donation
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce-quick-donation
Commits
4355de06
Commit
4355de06
authored
Oct 28, 2015
by
Varun Sridharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixs
Filter By Order Status And Other Features bug fixed shortcode display
parent
6d2cfd05
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1350 additions
and
4 deletions
+1350
-4
_old_wp-donation-listing-table.php
includes/admin/_old_wp-donation-listing-table.php
+1334
-0
class-admin-init.php
includes/admin/class-admin-init.php
+1
-1
wp-donation-listing-table.php
includes/admin/wp-donation-listing-table.php
+3
-2
class-shortcode-handler.php
includes/class-shortcode-handler.php
+12
-1
No files found.
includes/admin/_old_wp-donation-listing-table.php
0 → 100644
View file @
4355de06
This diff is collapsed.
Click to expand it.
includes/admin/class-admin-init.php
View file @
4355de06
...
...
@@ -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
);
...
...
includes/admin/wp-donation-listing-table.php
View file @
4355de06
...
...
@@ -76,12 +76,13 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
set_current_screen
(
'shop_order'
);
parent
::
__construct
(
array
(
'plural'
=>
'
post
s'
,
'plural'
=>
'
Donation
s'
,
'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
&post_type=
$post_typ
e
'
$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&page=wc_qd_orders&order_status=
$status_nam
e
'
$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
)
)
{
...
...
includes/class-shortcode-handler.php
View file @
4355de06
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment