Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/* | |
Plugin Name: WP-CRM System Create Task | |
Plugin URI: https://www.wp-crm.com | |
Description: Create a task in WP-CRM System. | |
Version: 1.0 | |
Author: Scott DeLuzio | |
Author URI: https://www.wp-crm.com | |
*/ | |
function wpcrm_system_programmatically_create_task() { |
function wpcrm_system_new_calendar_entry( $calendar, $month, $list_day, $year ){ | |
// Display an entry on the calender on December 25th every year. | |
if ( $month == 12 && $list_day == 25 ){ | |
$calendar .= '<li>Christmas</li>'; | |
} | |
// Display an entry on the calendar on September 5th 2017 | |
if ( $month == 9 && $list_day == 5 && $year == 2017 ){ | |
$calendar .= '<li>This is a date specific entry</li>'; | |
} | |
// Display an entry on the calendar on the 15th of every month |
<?php | |
function show_before_field_group( $content, $repeat, $field_number ){ | |
return 'This is some <strong>test</strong> info that will show up before each group of fields'; | |
if( $repeat == 1 && $field_number == 2 ){ | |
return 'This is some <strong>test</strong> info will show up only before the first instance of the field with ID 2'; | |
} | |
} | |
add_filter( 'cwcfp_before_conditional_field_grouping', 'show_before_field_group', 10, 3 ); | |
function show_before_each_field_id_one( $content, $repeat, $field_number ){ |
<?php | |
/* | |
* Our discounts are going to be applied to two products. In this case product IDs 54 & 55. Add/modify the $product_ids array as applicable. | |
* Both products will get the same tiered discounts but we don't want someone to buy 10 of product 54 and 1 of product 55 and get the discount for product 55. | |
* So, we need to create separate discounts only if the criteria is met for each product. | |
* The tiered discount will look like this: | |
* 10-24 of any single product = 25% discount | |
* 25-99 of any single product = 33% discount | |
* 100-249 of any single product = 40% discount | |
* 250-499 of any single product = 45% discount |
<?php | |
function show_content_before_fields(){ | |
$contents = '<h1>Teilnehmer-Daten</h1>'; | |
$contents .= 'Conditional fields here:<br>'; | |
echo $contents; | |
} | |
add_action( 'cwcfp_before_checkout_fields', 'show_content_before_fields' ); |
<?php | |
/* | |
* This has not been tested, but should work in theory. Use with care. | |
*/ | |
/* | |
* Remove the default WooCommerce Action | |
* Valid actions include: | |
* woocommerce_before_checkout_billing_form | |
* woocommerce_after_checkout_billing_form |
// for add child site | |
$params = array( | |
'url' => 'http://childsite.com', // child site url | |
'name' => 'my child site', // set name | |
'wpadmin' => 'admin-user-name', | |
'unique_id' => '', // set value if needed | |
'groupids' => array( ... ), // array of group ids | |
'ssl_verify' => 0, // or 1, 2 | |
'ssl_version' => 'auto', | |
'http_user' => '', // set value if needed |
<?php | |
// Function to add a new card for your customer. | |
function sd_process_add_customer_card(){ | |
$redirect = false; | |
if ( isset( $_POST['action'] ) && $_POST['action'] == 'add_customer_card' && wp_verify_nonce( $_POST['stripe_nonce'], 'stripe-nonce' ) ){ | |
if ( !isset( $_POST['card_number'] ) || !isset( $_POST['card_cvc'] ) || !isset( $_POST['card_exp_month'] ) || !isset( $_POST['card_exp_year'] ) ){ | |
$redirect = add_query_arg( array( | |
'card' => 'not-created', | |
), $_POST['redirect'] ); |
// Replace this | |
function wp_jv_prg_add_rg_meta_box_head() { | |
add_meta_box('wp_jv_prg_sectionid','WP JV Reading Groups','wp_jv_prg_add_rg_meta_box', 'post','side','high'); | |
add_meta_box('wp_jv_prg_sectionid','WP JV Reading Groups','wp_jv_prg_add_rg_meta_box', 'page','side','high'); | |
} | |
// With this | |
function wp_jv_prg_add_rg_meta_box_head() { | |
$post_types = wp_jv_prg_get_post_types(); |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors