Skip to content

[WAUM][38/n]Integrate GK RolloutSwitch for Whatsapp Utility Messaging Tab#3147

Merged
sharunaanandraj merged 8 commits intoWAUM-devfrom
gk-integration-1.1
May 8, 2025
Merged

[WAUM][38/n]Integrate GK RolloutSwitch for Whatsapp Utility Messaging Tab#3147
sharunaanandraj merged 8 commits intoWAUM-devfrom
gk-integration-1.1

Conversation

@sharunaanandraj
Copy link
Copy Markdown
Contributor

@sharunaanandraj sharunaanandraj commented May 6, 2025

Description

Integrate GK Switch for Whatsapp Utility Messaging Tab in both Settings and Enhanced Settings(MiCE) flows

Type of change

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

Changelog entry

Integrate GK Switch for Whatsapp Utility Messaging Tab

Test Plan

GK Pass

Settings

Screenshot 2025-05-07 at 12 06 01 PM

Enhanced Settings

Screenshot 2025-05-07 at 12 02 08 PM

GK Fail

Settings

Screenshot 2025-05-07 at 12 04 03 PM

Enhanced Settings

Screenshot 2025-05-07 at 12 03 00 PM

@sharunaanandraj sharunaanandraj marked this pull request as draft May 6, 2025 20:35
*/
private function parse_dependencies( $args ) {
$dependencies = wp_parse_args(
$dependencies = wp_parse_args(
Copy link
Copy Markdown
Contributor Author

@sharunaanandraj sharunaanandraj May 7, 2025

Choose a reason for hiding this comment

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

fixed by ./vendor/bin/phpcbf

Comment thread includes/Framework/Plugin.php Outdated
$previous_minor = $older_minor;

$supported_minor--;
--$supported_minor;
Copy link
Copy Markdown
Contributor Author

@sharunaanandraj sharunaanandraj May 7, 2025

Choose a reason for hiding this comment

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

fixed by ./vendor/bin/phpcbf

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.

discard Plugin and Dependencies changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This keeps showing up on every PR, thought it would be better to fix it instead.

@sharunaanandraj sharunaanandraj changed the title [Draft][Not for Review]Integrate GK Switch for Whatsapp Utility Messaging [WAUM][38/n]Integrate GK RolloutSwitch for Whatsapp Utility Messaging Tab May 7, 2025
@sharunaanandraj sharunaanandraj marked this pull request as ready for review May 7, 2025 19:21
@sharunaanandraj sharunaanandraj self-assigned this May 7, 2025
*/
public function __construct() {
add_action( 'init', array( $this, 'initHook' ) );
$this->initHook();
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.

is this change required?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. Previously initHook was only executed when wordpress init action takes place, which happens before the RolloutSwitch API fetch causing an error. This would allow initHook to only be executed after RolloutSwitch fetch

$external_business_id = $this->plugin->get_connection_handler()->get_external_business_id();
if ( empty( $external_business_id ) ) {
$access_token = $this->plugin->get_connection_handler()->get_access_token();
if ( empty( $access_token ) || empty( $external_business_id ) ) {
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.

why do you need access_token? Where is it being used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's used within get_api call for the RolloutSwitch API fetch.

@sharunaanandraj
Copy link
Copy Markdown
Contributor Author

@iodic Planning to merge this PR since it is not a major functionality change. Please let me know if you need any updates here.

@sharunaanandraj sharunaanandraj merged commit a8d2427 into WAUM-dev May 8, 2025
9 checks passed
@sharunaanandraj sharunaanandraj deleted the gk-integration-1.1 branch May 8, 2025 05:24
Copy link
Copy Markdown
Collaborator

@iodic iodic left a comment

Choose a reason for hiding this comment

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

lgtm!

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