This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_init', 'set_dashboard_meta_order' ); | |
/** | |
* Make sure our widget is always on top | |
* | |
*/ | |
function set_dashboard_meta_order() { | |
$user_id = get_current_user_id(); | |
$user_metabox_order = get_user_meta( $user_id, 'meta-box-order_dashboard' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is an example trigger that is triggered via a WordPress action and includes a user data item. | |
* Trigger with: do_action('my_custom_action', $user_id ); | |
*/ | |
class WPDesk_AutomateWoo_Subscription_Auto_Renew_Trigger extends AutomateWoo\Trigger { | |
/** @var array - Define which data items are set by this trigger, this determines which rules and actions will be available */ | |
public $supplied_data_items = array( 'customer', 'subscription' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'genesis_after_header', 'wpdesk_checkout_steps', 25 ); | |
/** | |
* Checkout Steps | |
* | |
*/ | |
function wpdesk_checkout_steps() { | |
global $wp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag | |
add_filter( 'gform_field_choice_markup_pre_render', function ( $choice_markup, $choice, $field ) { | |
if ( $field->get_input_type() == 'select' ) { | |
$choice_value = rgar( $choice, 'value' ); | |
if ( $choice_value === 'optgroup-start' ) { | |
return sprintf( '<optgroup label="%s">', esc_html( $choice['text'] ) ); | |
} elseif ( $choice_value === 'optgroup-end' ) { | |
return '</optgroup>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag | |
add_filter( 'wc_flexible_pricing_on_get_price', 'wpdesk_wc_flexible_pricing_on_get_price' ); | |
/** | |
* Allow Flexible Pricing sales on non-WooCommerce pages | |
* | |
*/ | |
function wpdesk_wc_flexible_pricing_on_get_price( $on_get_price ) { | |
if ( is_page() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag | |
add_action( 'gform_gravityformshelpscout_post_process_feed', 'wpdesk_helpscout_authentication_mail', 10, 4 ); | |
/** | |
* Email notification to admin about Gravity Forms Help Scout API authentication problem and create Help Scout conversation | |
* | |
*/ | |
function wpdesk_helpscout_authentication_mail( $feed, $entry, $form, $addon ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag | |
/** | |
* Enable shortcodes in email content | |
* | |
*/ | |
add_filter( 'automatewoo_email_content', 'do_shortcode' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Array( | |
[type] => normal | |
[series_id] => 3055245 | |
[price_type] => netto | |
[disposaldate] => 2017-12-05 | |
[date] => 2017-12-05 | |
[currency] => PLN | |
[alreadypaid_initial] => 1.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// NIE kopiuj powyższego tagu otwierającego php | |
/** | |
* Funkcja do walidacji polskiego numeru NIP | |
* | |
*/ | |
function wpdesk_fcf_validate_nip( $field_label, $value ) { | |
$valid = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag | |
add_filter( 'automatewoo/rules/includes', 'wpdesk_automatewoo_rules' ); | |
/** | |
* Custom Rules | |
* | |
*/ | |
function wpdesk_automatewoo_rules( $rules ) { |
NewerOlder