Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jeff Balicki
/
st_joseph
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
970b4319
authored
2023-03-28 15:43:39 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sss
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
4fc316cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
wp-content/themes/crlg/inc/woo.php
wp-content/themes/crlg/inc/woo.php
View file @
970b431
...
...
@@ -423,4 +423,24 @@ function display_custom_meta_data_in_backend_orders( $order ){
}
add_action
(
'wp_ajax_ajax_apply_coupon'
,
'ajax_apply_coupon'
);
add_action
(
'wp_ajax_nopriv_ajax_apply_coupon'
,
'ajax_apply_coupon'
);
\ No newline at end of file
add_action
(
'wp_ajax_nopriv_ajax_apply_coupon'
,
'ajax_apply_coupon'
);
/**
* Add a standard $ value surcharge to all transactions in cart / checkout
*/
add_action
(
'woocommerce_cart_calculate_fees'
,
'wc_add_surcharge'
);
function
wc_add_surcharge
()
{
global
$woocommerce
;
if
(
is_admin
()
&&
!
defined
(
'DOING_AJAX'
)
)
return
;
$county
=
array
(
'CAN'
);
// change the $fee to set the surcharge to a value to suit
$fee
=
1.00
;
$woocommerce
->
cart
->
add_fee
(
'Processing Fees'
,
$fee
,
true
,
'standard'
);
}
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment