# Troubleshooting

This guide covers common issues and their solutions for both the WordPress plugin and Google Sheets add-on.

# WordPress Plugin Issues

# API Key Not Working

Problem: Google Sheets add-on can't connect using your API key.

Solutions:

  1. Verify you copied the entire API key without extra spaces
  2. Generate a new API key in SheetPoet > Settings
  3. Ensure your WordPress site is accessible from the internet
  4. Check that the plugin is activated

# Functions Not Saving

Problem: Custom functions won't save or validate.

Solutions:

  1. Check for PHP syntax errors in your code
  2. Ensure your function returns a value (string, array, or array of objects)
  3. Make sure your function accepts a $record parameter (all function types use this parameter)
  4. Try a simpler function to test if the issue is with your code

# Execution Errors

Problem: Functions execute but return errors.

Solutions:

  1. Check the execution history in SheetPoet > History
  2. Look for PHP errors in your function code
  3. Verify that your function handles all possible input scenarios
  4. Check WordPress error logs for additional information

# Google Sheets Add-on Issues

# Can't Connect to WordPress

Problem: Add-on can't establish connection with WordPress.

Solutions:

  1. Verify your WordPress site URL (include https://)
  2. Check that your API key is correct
  3. Ensure your WordPress site is accessible
  4. Try reconnecting after clearing browser cache

# Functions Not Loading

Problem: No functions appear in the dropdown.

Solutions:

  1. Verify you've created functions in the WordPress plugin
  2. Check that you're connected to the correct WordPress site
  3. Try reconnecting to refresh the function list
  4. Ensure your API key has the necessary permissions

# Operation Errors

Problem: Functions execute but return errors.

Solutions:

  1. Check the error message for specific issues
  2. Verify your data format matches what the function expects
  3. Try with a smaller dataset to isolate the issue
  4. Check execution history in WordPress for detailed error information

# Data Issues

# Data Not Importing Correctly

Problem: Data from WordPress doesn't appear correctly in Google Sheets.

Solutions:

  1. Check your function's return format (must be an array of arrays or objects)
  2. Verify column mappings in your function
  3. Check for special characters or formatting issues
  4. Try with a smaller dataset to isolate the issue

# Data Not Updating in WordPress

Problem: Data from Google Sheets doesn't update WordPress correctly.

Solutions:

  1. Check your function's parameter handling
  2. Verify you're mapping the correct columns to parameters
  3. Check for required fields that might be missing
  4. Try updating a single row to isolate the issue

# Common Error Messages

# "Invalid API Key"

Solution: Generate a new API key in WordPress and update in Google Sheets.

# "Function Not Found"

Solution: Verify the function exists and is active in WordPress.

# "Missing Required Parameter"

Solution: Check that all required parameters are provided in Google Sheets.

# "Connection Failed"

Solution: Verify your WordPress site is accessible and the URL is correct.

# Performance Tips

  1. Process smaller batches of data at a time
  2. Optimize your function code for efficiency
  3. Disable unnecessary WordPress plugins during large operations
  4. Use simple data structures in your functions

# Still Having Issues?

Contact our support team at [email protected] with:

  1. Description of the issue
  2. Steps to reproduce
  3. Screenshots of any error messages
  4. WordPress version and theme
  5. List of active plugins