Skip to content

Instantly share code, notes, and snippets.

@henare
Created July 23, 2012 08:41
Show Gist options
  • Save henare/3162654 to your computer and use it in GitHub Desktop.
Save henare/3162654 to your computer and use it in GitHub Desktop.
Patch to fix CiviCRM Wordpress contribution form test-drive mode
--- a/WordPress/civicrm.php
+++ b/WordPress/civicrm.php
@@ -730,6 +730,10 @@ function civicrm_shortcode_handler( $atts ) {
switch ( $component ) {
case 'contribution':
$args['q' ] = 'civicrm/contribute/transact';
+ // Set test drive mode. Civi calls this 'preview' and the shortcode calls it 'test'
+ if ( $mode == 'test' ) {
+ $args['action'] = 'preview';
+ }
break;
case 'event':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment