Skip to content

Instantly share code, notes, and snippets.

@atanasantonov
Last active May 21, 2022 08:11
Show Gist options
  • Save atanasantonov/d0aeaeaefeaabcac323facfec1578dff to your computer and use it in GitHub Desktop.
Save atanasantonov/d0aeaeaefeaabcac323facfec1578dff to your computer and use it in GitHub Desktop.
Suggested modifications in WatuPRO
// Location: watupro/i/models/payment.php
// Line: 43
// Add hooks to modify reidrect.
$ww_bridge_redirect = apply_filters( 'watupro_payment_render_ww_bridge_redirect', true, $exam, $user_ID );
$link = get_permalink($advanced_settings['woo_product_id']);
if ( $ww_bridge_redirect && $link ) {
watupro_redirect($link);
} else {
do_action( 'watupro_payment_render_ww_bridge', $exam, $user_ID, $link );
return true;
}
// Location: watupro-woocom-bridge/watupro-woocom-bridge.php
// Line: 191
// Redirect or display text.
$action = apply_filters( 'watupro_ww_bridge_action', get_option( 'watupro_ww_bridge_action' ) );
if(empty($action)) $action = 'REDIRECT';
// Line: 220
$url = apply_filters( 'watupro_ww_bridge_url', get_permalink( $product_id ), $exam_id, $is_certificate, $product_id );
// Line: 233
$content = apply_filters( 'watupro_ww_bridge_content', get_option( 'watupro_ww_bridge_content' ), $exam_id, $is_certificate, $product_id );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment