• Resolved reneemarie1

    (@reneemarie1)


    Hi, I am trying to add a custom fee at checkout using the woocommerce_cart_calculate_fees hook. I used this code snippet from https://docs.woocommerce.com/document/subscriptions/develop/recurring-cart-fees/:

    
    add_filter( 'woocommerce_cart_calculate_fees', 'add_engraving_fees', 10, 1 );
    
    function add_engraving_fees( $cart ) {
         $cart->add_fee( 'Engraving', '10' );
    }
    

    The fee appears in the cart/checkout but it does not get added to the order total. I am very confused because this code seems to be working for everyone else in the support forums. I made sure that my plugins are up to date and I also tried deactivating other plugins in case there were any conflicts. I’m not sure what to try next. This is the last thing I need to fix before my site can launch. I would appreciate any guidance offered. Thank you!

    System Status Report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://swishtt.com
    Site address (URL): https://swishtt.com
    WC Version: 5.0.0
    REST API Version: ? 5.0.0
    WC Blocks Version: ? 4.0.0
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.9.0
    Log Directory Writable: ?
    WP Version: 5.6.1
    WP Multisite: –
    WP Memory Limit: 768 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.27
    PHP Post Max Size: 256 MB
    PHP Time Limit: 120
    PHP Max Input Vars: 3000
    cURL Version: 7.66.0
    OpenSSL/1.1.1g-fips
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.32-35-log
    Max Upload Size: 256 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 5.0.0
    WC Database Prefix: ltc_
    Total Database Size: 31.53MB
    Database Data Size: 27.93MB
    Database Index Size: 3.60MB
    ltc_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    ltc_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woocommerce_order_itemmeta: Data: 0.09MB + Index: 0.09MB + Engine InnoDB
    ltc_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    ltc_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_actionscheduler_actions: Data: 0.06MB + Index: 0.11MB + Engine InnoDB
    ltc_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_actionscheduler_logs: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    ltc_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
    ltc_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_options: Data: 3.03MB + Index: 0.16MB + Engine InnoDB
    ltc_postmeta: Data: 16.23MB + Index: 1.52MB + Engine InnoDB
    ltc_posts: Data: 6.42MB + Index: 0.28MB + Engine InnoDB
    ltc_sbi_instagram_feeds_posts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_sbi_instagram_feed_locator: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_sbi_instagram_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_tinvwl_analytics: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_tinvwl_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_tinvwl_lists: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_usermeta: Data: 0.09MB + Index: 0.06MB + Engine InnoDB
    ltc_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    ltc_wcfm_daily_analysis: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
    ltc_wcfm_detailed_analysis: Data: 0.17MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_enquiries: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_enquiries_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_enquiries_response: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_enquiries_response_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_fbc_chat_rows: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_fbc_chat_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wcfm_fbc_chat_visitors: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_fbc_offline_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_following_followers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wcfm_marketplace_orders_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_product_multivendor: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wcfm_marketplace_refund_request: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_refund_request_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_reverse_withdrawal: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_reverse_withdrawal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_reviews_response: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_reviews_response_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_review_rating_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_shipping_zone_locations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_store_taxonomies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_vendor_ledger: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_withdraw_request: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_marketplace_withdraw_request_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_membership_subscription: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wcfm_messages: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_messages_modifier: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_messages_stat: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_support: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_support_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_support_response: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wcfm_support_response_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    ltc_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    ltc_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    ltc_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    ltc_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woo_wallet_transactions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    ltc_woo_wallet_transaction_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    ltc_wpmm_subscribers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 286
    custom_css: 2
    custom-code: 2
    customize_changeset: 31
    elementor_library: 42
    envato_tk_import: 1
    nav_menu_item: 59
    oembed_cache: 5
    page: 26
    post: 14
    product: 40
    revision: 1203
    shop_coupon: 1
    shop_order: 65
    shop_order_refund: 4
    wpcf7_contact_form: 4
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (18) ###
    
    Contact Form 7: by Takayuki Miyoshi – 5.3.2
    Custom Codes: by PressX – 2.2.2
    Elementor: by Elementor.com – 3.1.1
    Envato Elements: by Envato – 2.0.8
    Max Mega Menu: by megamenu.com – 2.9.2
    SG Optimizer: by SiteGround – 5.7.14
    TI WooCommerce Wishlist: by TemplateInvaders – 1.23.5
    Advanced Editor Tools (previously TinyMCE Advanced): by Automattic – 5.6.0
    WCFM - WooCommerce Frontend Manager - Ultimate: by WC Lovers – 6.5.1
    WCFM - WooCommerce Frontend Manager: by WC Lovers – 6.5.6
    WCFM - WooCommerce Multivendor Marketplace: by WC Lovers – 3.4.6
    WCFM - WooCommerce Multivendor Membership: by WC Lovers – 2.9.5
    TeraWallet: by WCBeginner – 1.3.17
    WooCommerce: by Automattic – 5.0.0
    Credit Card (via WiPay): by WiPay Development Team – 2.0.2
    Woostify Sites Library: by Woostify – 1.3.2
    WordPress Starter: by SiteGround – 1.1.3
    WP Maintenance Mode: by Designmodo – 2.3.0
    
    ### Inactive Plugins (2) ###
    
    Smash Balloon Instagram Feed: by Smash Balloon – 2.8
    Variation Swatcher for WooCommerce: by ThemeAlien – 1.0.10
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: ?
    Currency: TTD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #6 - /shop/
    Cart: #7 - /cart/
    Checkout: #8 - /checkout/
    My account: #9 - /my-account/
    Terms and conditions: #1917 - /terms-and-conditions/
    
    ### Theme ###
    
    Name: Woostify
    Version: 1.8.3
    Author URL: https://woostify.com/about
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### TI WooCommerce Wishlist Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 132
    Oldest: 2021-01-20 11:28:41 -0400
    Newest: 2021-02-19 11:06:59 -0400
    
    
    • This topic was modified 3 years, 9 months ago by reneemarie1.
    • This topic was modified 3 years, 9 months ago by reneemarie1.
    • This topic was modified 3 years, 9 months ago by reneemarie1.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom fee is not adding to order total’ is closed to new replies.