Custom Plugins
Blocker Outdoors uses a suite of custom Rhino Group (Suma) WordPress plugins for enhanced e-commerce functionality, marketing integration, and site management.
Plugin Overview
| Plugin | Version | Purpose |
|---|---|---|
| Suma Patches | v1.5.19 | WordPress core customizations and performance optimization |
| Suma Dealer Locator | v3.0.2 | Store finder with Google Maps and GeoIP |
| Suma Analytics Master | v1.3.5 | E-commerce event tracking for GA4 |
| Suma BazaarVoice Integrator | v1.1.4 | Product review integration and XML feed |
| Back in Stock Notifications | v1.3.2 | Inventory alert system with Klaviyo |
| Gift Certificate Creator | v1.0.0 | Digital gift certificate system |
| Narvar Middleware | v1.2.7 | Order tracking and shipment integration |
Suma Patches v1.5.19
Core WordPress customizations and performance enhancements.
Features
-
Performance Optimization
- Query optimization for large product catalogs
- Database index management
- Object cache enhancements
- Transient cleanup automation
-
Security Hardening
- Login attempt limiting
- File permission checks
- Admin area IP restrictions
- Header security enhancements
-
WooCommerce Enhancements
- Cart fragment optimization
- Checkout field customization
- Order meta cleanup
-
Admin Customizations
- Simplified admin menu
- Custom dashboard widgets
- Bulk action enhancements
-
Image Handling
- Additional image sizes for BigCommerce products
- WebP format support
- Automatic image optimization
Configuration
// wp-config.php or site-specific plugin
define( 'SUMA_PATCHES_LOGIN_ATTEMPTS', 5 );
define( 'SUMA_PATCHES_LOCKOUT_DURATION', 900 ); // 15 minutes
define( 'SUMA_PATCHES_ENABLE_QUERY_OPTIMIZATION', true );
define( 'SUMA_PATCHES_ADMIN_IP_WHITELIST', '192.168.1.0/24,10.0.0.0/8' );
Key Hooks
// Modify query optimization behavior
add_filter( 'suma_patches_optimize_query', function( $optimize, $query ) {
// Disable optimization for specific queries
if ( $query->get( 'post_type' ) === 'custom_post_type' ) {
return false;
}
return $optimize;
}, 10, 2 );
// Customize image sizes
add_filter( 'suma_patches_image_sizes', function( $sizes ) {
$sizes['product_hero'] = [ 1200, 800, true ];
return $sizes;
} );
Suma Dealer Locator v3.0.2
Store finder with Google Maps integration, radius search, and category filtering.
Features
- Google Maps Integration: Interactive map with custom markers
- GeoIP Lookup: Automatic user location detection
- Radius Search: Find dealers within X miles
- Category Filtering: Filter by dealer type
- Bulk Import: CSV dealer import
- Custom Fields: Extensible dealer information
- Multiple Display Modes: List, map, or combined
Installation
wp plugin install suma-dealer-locator-v3.0.2.zip --activate
# Configure Google Maps API key
wp option update suma_dealer_locator_google_api_key 'YOUR_API_KEY_HERE'
Shortcode Usage
// Basic dealer locator
[suma_dealer_locator]
// With default location
[suma_dealer_locator default_lat="39.7392" default_lng="-104.9903"]
// With category filter
[suma_dealer_locator categories="retail,pro-shop"]
// Map only (no list)
[suma_dealer_locator view="map"]
// List only (no map)
[suma_dealer_locator view="list"]
Custom Post Type
// Register custom fields for dealers
add_action( 'acf/init', function() {
if ( function_exists( 'acf_add_local_field_group' ) ) {
acf_add_local_field_group( [
'key' => 'group_dealer_info',
'title' => 'Dealer Information',
'fields' => [
[
'key' => 'field_dealer_phone',
'label' => 'Phone Number',
'name' => 'dealer_phone',
'type' => 'text',
],
[
'key' => 'field_dealer_website',
'label' => 'Website',
'name' => 'dealer_website',
'type' => 'url',
],
[
'key' => 'field_dealer_hours',
'label' => 'Business Hours',
'name' => 'dealer_hours',
'type' => 'textarea',
],
],
'location' => [
[
[
'param' => 'post_type',
'operator' => '==',
'value' => 'suma_dealer',
],
],
],
] );
}
} );
API Integration
// REST API endpoint for AJAX search
register_rest_route( 'suma-dealer-locator/v1', '/search', [
'methods' => 'GET',
'callback' => 'suma_dealer_locator_search',
'permission_callback' => '__return_true',
'args' => [
'lat' => [ 'required' => true, 'validate_callback' => 'is_numeric' ],
'lng' => [ 'required' => true, 'validate_callback' => 'is_numeric' ],
'radius' => [ 'default' => 50, 'validate_callback' => 'is_numeric' ],
'category' => [ 'default' => '' ],
],
] );
Suma Analytics Master v1.3.5
E-commerce event tracking for Google Analytics 4.
Tracked Events
-
Product Events
view_item- Product page viewview_item_list- Product listing pageadd_to_cart- Add to cart button clickremove_from_cart- Remove from cartadd_to_wishlist- Wishlist addition
-
Cart & Checkout Events
view_cart- Cart page viewbegin_checkout- Checkout initiatedadd_payment_info- Payment method selectedadd_shipping_info- Shipping method selected
-
Purchase Events
purchase- Order completedrefund- Order refunded
Configuration
// wp-config.php
define( 'SUMA_ANALYTICS_GA4_ID', 'G-XXXXXXXXXX' );
define( 'SUMA_ANALYTICS_DEBUG', false ); // Enable console logging
// Optional: Custom dimensions
define( 'SUMA_ANALYTICS_DIMENSIONS', json_encode( [
'user_type' => 'dimension1',
'dealer_status' => 'dimension2',
] ) );
JavaScript Implementation
// Automatically tracked via data-layer push
// Manual tracking example:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': 'USD',
'value': 149.99,
'items': [{
'item_id': 'BC123456',
'item_name': 'Scent Blocker Jacket',
'item_brand': 'Blocker Outdoors',
'item_category': 'Jackets',
'item_variant': 'Large/Realtree Edge',
'price': 149.99,
'quantity': 1
}]
}
});
BigCommerce Integration
// Track BigCommerce add-to-cart events
add_action( 'bigcommerce/cart/add_item', function( $product_id, $variant_id, $quantity ) {
$product = get_post( $product_id );
$price = get_post_meta( $product_id, 'bigcommerce_price', true );
?>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'items': [{
'item_id': '<?php echo esc_js( get_post_meta( $product_id, 'bigcommerce_id', true ) ); ?>',
'item_name': '<?php echo esc_js( $product->post_title ); ?>',
'price': <?php echo floatval( $price ); ?>,
'quantity': <?php echo intval( $quantity ); ?>
}]
}
});
</script>
<?php
}, 10, 3 );
Suma BazaarVoice Integrator v1.1.4
Product review integration with automated XML feed generation.
Features
- Review Display: Show BazaarVoice reviews on product pages
- XML Feed Generation: Automated product catalog feed
- Cron Automation: Scheduled feed updates
- Variant Support: Handle product variants
- UPC Handling: Include UPC codes in feed
Configuration
// BazaarVoice settings
define( 'BAZAARVOICE_CLIENT_NAME', 'blockeroutdoors' );
define( 'BAZAARVOICE_SITE_ID', 'main_site' );
define( 'BAZAARVOICE_ENVIRONMENT', 'production' ); // or 'staging'
define( 'BAZAARVOICE_FEED_URL', 'https://blockeroutdoors.com/feeds/bazaarvoice.xml' );
XML Feed Generation
// Manual feed generation
do_action( 'suma_bazaarvoice_generate_feed' );
// Schedule daily feed generation at 2 AM
if ( ! wp_next_scheduled( 'suma_bazaarvoice_daily_feed' ) ) {
wp_schedule_event( strtotime( '02:00:00' ), 'daily', 'suma_bazaarvoice_daily_feed' );
}
add_action( 'suma_bazaarvoice_daily_feed', function() {
do_action( 'suma_bazaarvoice_generate_feed' );
} );
Product Feed XML Structure
<?xml version="1.0" encoding="UTF-8"?>
<Feed xmlns="http://www.bazaarvoice.com/xs/PRR/ProductFeed/14.7"
name="Product Catalog"
incremental="false"
extractDate="2026-04-20T12:00:00">
<Products>
<Product>
<ExternalId>BC123456</ExternalId>
<Name>Scent Blocker Jacket</Name>
<Description>Advanced scent control technology...</Description>
<CategoryPath>
<CategoryPathElement>
<CategoryPathPosition>1</CategoryPathPosition>
<CategoryName>Jackets</CategoryName>
</CategoryPathElement>
</CategoryPath>
<ProductPageURL>https://blockeroutdoors.com/product/scent-blocker-jacket</ProductPageURL>
<ImageURL>https://blockeroutdoors.com/wp-content/uploads/jacket.jpg</ImageURL>
<ManufacturerPartNumbers>
<ManufacturerPartNumber>BL-JACKET-001</ManufacturerPartNumber>
</ManufacturerPartNumbers>
<BrandName>Blocker Outdoors</BrandName>
<UPCs>
<UPC>123456789012</UPC>
</UPCs>
</Product>
</Products>
</Feed>
Back in Stock Notifications v1.3.2
Inventory alert system with Klaviyo integration.
Features
- Email Alerts: Notify customers when products return to stock
- Klaviyo Integration: Automated flow triggers
- Product Feed: Generate feed for Klaviyo back-in-stock flow
- AJAX Forms: Non-blocking form submission
- Stock Monitoring: Automatic inventory checks
Shortcode
// Basic form
[back_in_stock_form product_id="12345"]
// With custom button text
[back_in_stock_form product_id="12345" button_text="Notify Me"]
// With custom success message
[back_in_stock_form product_id="12345" success_message="We'll email you!"]
Klaviyo Integration
// Configuration
define( 'KLAVIYO_API_KEY', 'pk_xxxxx' );
define( 'KLAVIYO_LIST_ID', 'XYZ123' ); // Back in stock list
// Subscribe customer to back-in-stock list
function subscribe_to_back_in_stock( $email, $product_id ) {
$product = get_post( $product_id );
$bc_id = get_post_meta( $product_id, 'bigcommerce_id', true );
$klaviyo_data = [
'email' => $email,
'properties' => [
'ProductID' => $bc_id,
'ProductName' => $product->post_title,
'ProductURL' => get_permalink( $product_id ),
'ImageURL' => get_the_post_thumbnail_url( $product_id, 'medium' ),
],
];
wp_remote_post( 'https://a.klaviyo.com/api/v2/list/' . KLAVIYO_LIST_ID . '/subscribe', [
'headers' => [
'Content-Type' => 'application/json',
],
'body' => json_encode( $klaviyo_data ),
] );
}
Gift Certificate Creator v1.0.0
Custom digital gift certificate system with PDF generation and redemption tracking.
Features
- PDF Generation: Professional gift certificate PDFs
- Email Delivery: Automated email to recipient
- Redemption Codes: Unique, secure codes
- Balance Tracking: Partial redemption support
- BigCommerce Integration: Discount code generation
Usage
// Create gift certificate
$certificate_id = create_gift_certificate( [
'amount' => 100.00,
'recipient_email' => '[email protected]',
'recipient_name' => 'John Doe',
'sender_name' => 'Jane Smith',
'message' => 'Happy Birthday!',
'delivery_date' => '2026-04-25',
] );
// Generate BigCommerce coupon code
$coupon_code = generate_bc_coupon_from_certificate( $certificate_id );
// Check balance
$balance = get_certificate_balance( $certificate_id );
// Redeem (partial or full)
redeem_certificate( $certificate_id, $amount = 50.00, $order_id = 12345 );
Narvar Middleware v1.2.7
Order tracking and shipment integration with webhook processing.
Features
- Webhook Processing: Receive shipment updates from BigCommerce
- Narvar API Integration: Push tracking data to Narvar
- Queue System: Reliable webhook processing
- Retry Logic: Handle API failures gracefully
- Status Mapping: Convert BC statuses to Narvar format
Configuration
// Narvar credentials
define( 'NARVAR_API_KEY', 'xxxxx' );
define( 'NARVAR_RETAILER_MONIKER', 'blockeroutdoors' );
define( 'NARVAR_API_URL', 'https://api.narvar.com/v1' );
// Webhook endpoint
// POST /wp-json/narvar/v1/webhook/shipment
Order Shipment Flow
BigCommerce Order Ships
│
│ Webhook: store/shipment/created
│
▼
WordPress Webhook Receiver
│
│ Validate signature
│ Parse shipment data
│
▼
Add to Processing Queue
│
│ Cron job processes queue
│
▼
Push to Narvar API
│
│ POST /orders/{order_id}/shipments
│ {
│ "carrier": "UPS",
│ "tracking_number": "1Z999AA10123456784",
│ "ship_date": "2026-04-20",
│ "items": [...]
│ }
│
▼
Customer Receives Tracking Email
API Integration
// Push shipment to Narvar
function push_shipment_to_narvar( $order_id, $shipment_data ) {
$endpoint = sprintf(
'%s/orders/%s/shipments',
NARVAR_API_URL,
$order_id
);
$response = wp_remote_post( $endpoint, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . NARVAR_API_KEY,
'Narvar-Retailer-Moniker' => NARVAR_RETAILER_MONIKER,
],
'body' => json_encode( $shipment_data ),
'timeout' => 30,
] );
if ( is_wp_error( $response ) ) {
// Log error and retry later
error_log( 'Narvar API Error: ' . $response->get_error_message() );
return false;
}
$status = wp_remote_retrieve_response_code( $response );
if ( $status === 200 || $status === 201 ) {
return true;
}
// Log failure for retry
error_log( sprintf(
'Narvar API returned status %d for order %s',
$status,
$order_id
) );
return false;
}
Plugin Dependencies
Required Plugins
- Advanced Custom Fields Pro v6.3.12+
- BigCommerce for WordPress (Suma) v5.0.7.17+
Recommended Plugins
- Elementor Pro v3.28+ (for Suma Elementor theme)
- FacetWP Pro v4.3+ (for Dealer Locator filtering)
- Gravity Forms v2.9+ (for advanced forms)
Conflicts
- Avoid using WooCommerce plugins (BigCommerce-only site)
- Disable generic review plugins (conflicts with BazaarVoice)
- Remove redundant analytics plugins (use Suma Analytics Master)
Troubleshooting
Plugin Activation Issues
# Check plugin dependencies
wp plugin list --status=active
# Verify required PHP extensions
php -m | grep -E 'curl|json|mbstring|gd'
# Check file permissions
find wp-content/plugins/suma-* -type f -not -perm 644 -ls
find wp-content/plugins/suma-* -type d -not -perm 755 -ls
# Clear object cache
wp cache flush
Debug Mode
// Enable debug logging for Suma plugins
define( 'SUMA_DEBUG', true );
define( 'SUMA_DEBUG_LOG', WP_CONTENT_DIR . '/suma-debug.log' );
// Check logs
tail -f /var/www/html/wp-content/suma-debug.log