event snippet

<!– Event snippet for Phone call lead conversion page –><script>gtag(‘event’, ‘conversion’, {‘send_to’: ‘AW-18137337252/pdLiCOvn4qocEKSbx8hD’});</script>Continue reading

AffiliateWP Network Stats Shortcode

/** * Helper: sum product-only sales (excludes shipping) for one affiliate. * Filters to WooCommerce context so the dataset matches the SALES table. */ function affwp_product_only_sales( $affiliate_id, $status_array ) { $total = 0.0; $referrals = affiliate_wp()->referrals->get_referrals( array( ‘affiliate_id’ => absint(…Continue reading

Fix coupon displaying 0% in the affiliate dashboard

add_filter( ‘get_post_metadata’, function( $value, $object_id, $meta_key, $single ) { static $running = false; if ( $running ) { return $value; } $intercepted = array( ‘_mepr_coupons_discount_amount’, ‘_mepr_coupons_discount_type’ ); if ( ! in_array( $meta_key, $intercepted, true ) ) { return $value; }…Continue reading

Mytestsnippet

global $wpdb; $table_name = $wpdb->prefix . ‘myfirst’; // Use prefix for security $results = $wpdb->get_results(“SELECT * FROM $table_name”); if ( ! empty( $results ) ) { echo ‘ ‘; foreach ( $results as $row ) { echo ‘ ‘; echo…Continue reading