This file contains hidden or 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
public function getKeyFromUrl($url) | |
{ | |
$index = mb_strpos($url, '.com'); | |
return mb_substr($url, $index+4); | |
} |
This file contains hidden or 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
$this->criteria->params[':cli'] = $this->clientId; | |
$this->criteria->params[':cor'] = $this->correspondenceAccountId; | |
$this->criteria->params[':cdi'] = $this->creditDebitIndicator == 'K' ? 'D' : 'K'; // Invert logic | |
$this->criteria->params[':invcdi'] = $this->creditDebitIndicator; | |
$this->criteria->order = 'd_data ASC, d_dok ASC'; |
This file contains hidden or 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
c.sendEmail = function () { | |
c.savingData = true; | |
if (_.isUndefined(c.model.toEmail) && model.templateId === 7) { | |
if (model.agreementIds.length === 1 && model.agreementIds[0] === 0) { | |
//get all employees | |
personnelEmployee.fetchAllWorkingEmployees() | |
.then(function (data) { | |
console.log(data); | |
prepareAndSend(); | |
}) |
This file contains hidden or 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
// add text to template in woocommerce_email_before_order_table hook | |
function filter_woocommerce_email_before_table( $order, $is_admin_email ) { | |
// make filter magic happen here... | |
echo '<h1><strong>Discount used </h1>'; | |
}; | |
add_action( 'woocommerce_email_before_order_table', 'filter_woocommerce_email_before_table', 10, 3 ); |
This file contains hidden or 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
var myElement = angular.element($document[0].querySelector('.form-control.input-sm.ng-valid.ng-not-empty.ng-dirty.ng-valid-parse.ng-touched')); | |
myElement.trigger('hideCalendar.daterangepicker'); |
This file contains hidden or 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
/** | |
* enable log writing | |
* // Enable WP_DEBUG mode | |
define( 'WP_DEBUG', true ); | |
// Enable Debug logging to the /wp-content/debug.log file | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
*/ | |
if (!function_exists('write_log')) { |
This file contains hidden or 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
add_action( 'wp_footer', 'ybc_javascript_validation' ); | |
function ybc_javascript_validation(){ | |
if( !is_checkout() ) return; | |
?> <script>jQuery(function($){ | |
$('body').on('blur change', '#billing_birthday', function(){ | |
// alert($(this).val()); | |
var formRow = $(this).parents('.form-row'); | |
// if( /\d/.test( $(this).val() ) ) { |
This file contains hidden or 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
add_filter( 'woocommerce_checkout_fields', 'pulse_checkout_fields_validate_birthdate', 9999 ); | |
function pulse_checkout_fields_validate_birthdate( $fields ) { | |
$cart = WC()->cart->get_cart(); | |
foreach ( $cart as $cart_item ) { | |
$variation = wc_get_product($cart_item['variation_id']); | |
$variationFormattedName = $variation->get_formatted_name(); | |
$cartItemVariationIsChildrenRace = (strpos($variationFormattedName, 'Детский')>0); | |
write_log($cartItemVariationIsChildrenRace); | |
This file contains hidden or 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
other.country.controller.js: | |
c.possibleCountries = { | |
config: {}, | |
filter: { | |
countryType: 0 | |
}, | |
data: [], | |
}; |
This file contains hidden or 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
_.set(c.possibleCountries.filter, ['filters', 'groupOp'], 'AND'); | |
//exclude selected countries | |
_.set(c.possibleCountries.filter, ['filters', 'rules', 'id'], { | |
field: 'id', | |
op: 'ni', | |
data: c.model.countriesTypeIds | |
}); | |
//set filter on EU countries | |
_.set(c.possibleCountries.filter, ['filters', 'rules', 'typeId'], { | |
field: 'typeId', |
NewerOlder