• Resolved therighttype

    (@therighttype)


    Hi there,

    I want to add the payment method to the “New order” email.
    I found this snippet (below) and added it to my Functions.php but now it’s only showing
    the heading: “Payment method” and not the actual method with the heading…

    For example, I want it to show: “Payment Method: PayFast”

    _________________________________________________________________
    add_action( ‘woocommerce_email_after_order_table’, ‘bbloomer_display_payment_type_name_emails’, 15 );

    function bbloomer_display_payment_type_name_emails( $order ) {
    echo ‘<h2>Payment Type:</h2><p> ‘ . $order->get_payment_method_title() . ‘</p>’;
    }
    _________________________________________________________________

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter therighttype

    (@therighttype)

    Thanks Riaan ??

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @therighttype,

    I tried adding your snippet to my test site, and it seemed to be working without any issues. Also, by default it should be displaying the payment method as well:

    payment method
    Link to image: https://d.pr/i/unn4uN

    I’m wondering if the difference might be coming from your active theme and any template overrides in that theme. If you try switching back to the default Storefront theme, do you see the payment method displayed?

    Also, if you test with a different payment gateway, does it make a difference? (you could test with the built-in Check gateway).

    If you are still having trouble, please share a copy of your site’s System Status. You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, you can paste it here in your reply. Please note that since this is a public forum, you may want to remove any sensitive information that you don’t want shared publicly.

    Thread Starter therighttype

    (@therighttype)

    Hi Kelly

    Thank you for the update.
    I’m hesitant to change the storefront back to the default because the client store needs to be up and running as she just released new Planners on pre-orders. If you can have a look at my system status and check if all is good that would be awesome, and then I’ll know if I need to contact the theme support ( my current theme is Divi)

    
    ### WordPress Environment ###
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.32-log
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 4.6.1
    WC Database Prefix: wp3v_
    Total Database Size: 12.27MB
    Database Data Size: 10.25MB
    Database Index Size: 2.02MB
    wp3v_woocommerce_sessions: Data: 0.13MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_order_items: Data: 0.04MB + Index: 0.02MB + Engine MyISAM
    wp3v_woocommerce_order_itemmeta: Data: 0.18MB + Index: 0.13MB + Engine MyISAM
    wp3v_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_acl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_blocks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_countries: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_lab: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_lab_ip: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_lab_net: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_log: Data: 0.19MB + Index: 0.11MB + Engine MyISAM
    cerber_qmem: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cerber_traffic: Data: 0.36MB + Index: 0.02MB + Engine MyISAM
    mstud_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    mstud_comments: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    mstud_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    mstud_options: Data: 0.02MB + Index: 0.01MB + Engine MyISAM
    mstud_postmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    mstud_posts: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    mstud_termmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    mstud_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    mstud_term_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    mstud_term_taxonomy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    mstud_usermeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    mstud_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_actionscheduler_actions: Data: 0.36MB + Index: 0.16MB + Engine MyISAM
    wp3v_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_actionscheduler_logs: Data: 0.24MB + Index: 0.20MB + Engine MyISAM
    wp3v_bobsi_tradefeed_audit: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
    wp3v_bobsi_tradefeed_product: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp3v_bobsi_tradefeed_product_base: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp3v_cerber_files: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_cerber_sets: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_cerber_uss: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_comments: Data: 0.13MB + Index: 0.06MB + Engine MyISAM
    wp3v_et_bloom_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_fca_eoi_activity: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_fca_eoi_subscribers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_gglcptch_whitelist: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp3v_layerslider: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_layerslider_revisions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_mailchimp_carts: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_mailchimp_jobs: Data: 0.05MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_action_meta: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_chunks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_fields: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_field_meta: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_forms: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_form_meta: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_objects: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_object_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_nf3_upgrades: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
    wp3v_options: Data: 2.79MB + Index: 0.19MB + Engine MyISAM
    wp3v_postmeta: Data: 2.86MB + Index: 0.61MB + Engine MyISAM
    wp3v_posts: Data: 2.08MB + Index: 0.14MB + Engine MyISAM
    wp3v_revslider_css: Data: 0.09MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_css_bkp: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_layer_animations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_navigations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_sliders: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_sliders_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_slides: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_revslider_static_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_rwc_unlogged_user_data: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_sbi_instagram_feeds_posts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_sbi_instagram_posts: Data: 0.10MB + Index: 0.00MB + Engine MyISAM
    wp3v_sgpb_subscribers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_sgpb_subscription_error_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_termmeta: Data: 0.05MB + Index: 0.01MB + Engine MyISAM
    wp3v_terms: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp3v_term_relationships: Data: 0.01MB + Index: 0.03MB + Engine MyISAM
    wp3v_term_taxonomy: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp3v_usermeta: Data: 0.07MB + Index: 0.04MB + Engine MyISAM
    wp3v_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_customer_lookup: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp3v_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_order_product_lookup: Data: 0.03MB + Index: 0.03MB + Engine MyISAM
    wp3v_wc_order_stats: Data: 0.01MB + Index: 0.02MB + Engine MyISAM
    wp3v_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_product_meta_lookup: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp3v_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wpforms_tasks_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_wpf_filters: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yith_wcwl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yith_wcwl_lists: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yoast_indexable: Data: 0.15MB + Index: 0.05MB + Engine MyISAM
    wp3v_yoast_indexable_hierarchy: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp3v_yoast_primary_term: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yoast_seo_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yoast_seo_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp3v_yoco_order_errors: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    attachment: 579
    clever_menu_theme: 1
    customize_changeset: 24
    custom_css: 3
    easy-opt-ins: 1
    et_body_layout: 2
    et_template: 5
    et_theme_builder: 1
    gotmls_quarantine: 1
    ign_voucher: 1
    mc4wp-form: 1
    nav_menu_item: 12
    oembed_cache: 5
    page: 18
    post: 12
    product: 71
    raccartlist: 5
    racemailtemplate: 1
    revision: 522
    shop_coupon: 8
    shop_order: 131
    thegem_footer: 3
    thegem_gallery: 2
    thegem_qf_item: 20
    thegem_team_person: 3
    thegem_title: 2
    woo_discount: 2
    woo_discount_cart: 1
    woo_mb_template: 10
    wpcf7_contact_form: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (31) ###
    
    Ajax Cart AutoUpdate for WooCommerce: by taisho – 1.5.4 – Installed version not tested with active version of WooCommerce 4.6.1
    Contact Form 7: by Takayuki Miyoshi – 5.3
    GDPR Cookie Consent: by WebToffee – 1.9.3
    Custom Order Numbers for WooCommerce: by Tyche Softwares – 1.2.10 – Installed version not tested with active version of WooCommerce 4.6.1
    Custom Sidebars: by WPMU DEV – 3.2.3
    Facebook for WooCommerce: by Facebook – 2.1.2
    reCaptcha by BestWebSoft: by BestWebSoft – 1.58
    Smash Balloon Instagram Feed: by Smash Balloon – 2.5.3
    Kadence WooCommerce Email Designer: by Kadence WP – 1.4.3 – Installed version not tested with active version of WooCommerce 4.6.1
    Custom Login Page Customizer: by Hardeep Asrani – 2.0.1
    Mailchimp for WooCommerce: by Mailchimp – 2.4.7 – Installed version not tested with active version of WooCommerce 4.6.1
    Pin It Button On Image Hover And Post: by Weblizar – 2.7.8
    Popup Builder: by Sygnoos – 3.69.3
    Qty Increment Buttons for WooCommerce: by taisho – 2.7.5 – Installed version not tested with active version of WooCommerce 4.6.1
    Really Simple SSL: by Really Simple Plugins – 3.3.5
    Shoppable Social Media Galleries by SNPT: by Snapppt – 1.1.8
    Sitewide Notice WP: by Yoohoo Plugins – 2.2.1
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.16.33
    
    White Label CMS: by www.videousermanuals.com – 2.2.1
    Woo Discount Rules: by Flycart Technologies LLP – 2.3.1
    WooCommerce Admin: by WooCommerce – 1.6.2 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce Ozow Gateway: by <a href="https://Ozow.com" />Ozow</a> – 1.0.0.0 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce SnapScan Gateway: by WooCommerce – 1.1.5 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce PayFast Gateway: by WooCommerce – 1.4.15 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 2.7.0
    WooCommerce Shipping & Tax: by Automattic – 1.25.1 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce Shipment Tracking: by WooCommerce – 1.6.4 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce Wholesale Pro Suite: by IgniteWoo.com – 3.0.55 – Installed version not tested with active version of WooCommerce 4.6.1
    WooCommerce: by Automattic – 4.6.1
    WP Cerber Security, Anti-spam & Malware Scan: by Cerber Tech Inc. – 8.6.7
    Yoco Payment Gateway: by Yoco – 1.44
    
    ### Inactive Plugins (1) ###
    
    WooCommerce Payflex Gateway: by Payflex – 1.9 – Installed version not tested with active version of WooCommerce 4.6.1
    
    ### Must Use Plugins (1) ###
    
    aaa-wp-cerber.php: by Cerber Tech Inc. – 1.0
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: ZAR (R)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    gift-card (gift-card)
    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: #1129 - /shop/
    Cart: #1130 - /cart/
    Checkout: #1131 - /checkout/
    My account: #1132 - /my-account/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Divi
    Version: 4.6.6
    Author URL: https://www.elegantthemes.com
    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: –
    
    ### Action Scheduler ###
    
    Complete: 1,363
    Oldest: 2020-09-28 15:08:30 +0000
    Newest: 2020-10-29 10:03:02 +0000
    
    Pending: 1
    Oldest: 2020-10-29 21:42:56 +0000
    Newest: 2020-10-29 21:42:56 +0000
    
    
    • This reply was modified 4 years, 1 month ago by therighttype.
    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    Thank you for providing that Status Report. I see you are using an email designer plugin Kadence WooCommerce Email Designer: by Kadence WP – 1.4.3 — that could be affecting the emails and preventing the snippet from working. The Divi theme is another possibility to explain the difference in display/behavior.

    I’m hesitant to change the storefront back to the default because the client store needs to be up and running as she just released new Planners on pre-orders.

    To avoid affecting the live site / customers, you could do the testing on a staging site. If you don’t have one already, your hosting company might offer one as part of your package. Alternatively, you can use a free plugin like https://www.ads-software.com/plugins/wp-staging/

    AJ a11n

    (@amandasjackson)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Payment method not showing in “New Order” email’ is closed to new replies.