Skip to content

[WAUM] Link View Insights to Template Insights in WhatsApp Manager#3061

Merged
woo-ardsouza merged 2 commits intoWAUM-devfrom
WAUM-manage-templates-1.1
May 1, 2025
Merged

[WAUM] Link View Insights to Template Insights in WhatsApp Manager#3061
woo-ardsouza merged 2 commits intoWAUM-devfrom
WAUM-manage-templates-1.1

Conversation

@woo-ardsouza
Copy link
Copy Markdown
Contributor

@woo-ardsouza woo-ardsouza commented Apr 16, 2025

Description

Using the waba and business ID info stored in DB to direct the user to the WhatsApp Manager template insights when View Insights link is clicked. Also updated the billing url to reuse the same action

Type of change

  • New feature (non-breaking change which adds functionality)

Changelog entry

Update View Insights to link to template insights in WhatsApp Manager

Test Plan

Clicking on the View Insights link in the Utility Messsage Overview view opens the template insights in WhatsApp Manager and Clicking on add payment button opens the billing hub for the whatsapp business account like PR 3032

Screen Recordings

Utility Messsage Onboarding

Clicking on add payment button opens the billing hub

Screen.Recording.2025-04-15.at.6.48.25.PM.mov

Utility Messsage Overview

Clicking on view insights opens WhatsApp Manager template insights

Screen.Recording.2025-04-15.at.9.36.07.AM.mov

@woo-ardsouza woo-ardsouza marked this pull request as ready for review April 16, 2025 02:00
Copy link
Copy Markdown
Contributor

@sharunaanandraj sharunaanandraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm!

Comment thread includes/AJAX.php
if ( ! check_ajax_referer( 'facebook-for-wc-whatsapp-billing-nonce', 'nonce', false ) ) {
public function wc_facebook_whatsapp_fetch_url_info() {
facebook_for_woocommerce()->log( 'Fetching url info for whatsapp pages' );
if ( ! check_ajax_referer( 'facebook-for-wc-whatsapp-billing-nonce', 'nonce', false ) && ! check_ajax_referer( 'facebook-for-wc-whatsapp-templates-nonce', 'nonce', false ) ) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( ! check_ajax_referer( 'facebook-for-wc-whatsapp-billing-nonce', 'nonce', false ) && ! check_ajax_referer( 'facebook-for-wc-whatsapp-templates-nonce', 'nonce', false ) ) {
if ( ! (check_ajax_referer( 'facebook-for-wc-whatsapp-billing-nonce', 'nonce', false ) || check_ajax_referer( 'facebook-for-wc-whatsapp-templates-nonce', 'nonce', false ) ) ) {

@woo-ardsouza woo-ardsouza merged commit 86c5c48 into WAUM-dev May 1, 2025
9 checks passed
@woo-ardsouza woo-ardsouza deleted the WAUM-manage-templates-1.1 branch May 1, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants