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
<?php | |
declare( strict_types=1 ); | |
namespace Automattic\WooCommerce\GoogleListingsAndAds\Shipping; | |
use Automattic\WooCommerce\GoogleListingsAndAds\Infrastructure\Service; | |
use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WC; | |
use WC_Shipping_Method; | |
use WC_Shipping_Zone; |
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
<script> | |
window.dataLayer = window.dataLayer || []; | |
window.gtag = window.gtag || function gtag() { | |
dataLayer.push( arguments ); | |
}; | |
var _cec = new Map( Cookies.get( 'cookieyes-consent' ) ? Cookies.get( 'cookieyes-consent' ).split( ',' ).map( a => a.split( ':' ) ) : [] ); | |
var _hsp = window._hsp = window._hsp || []; | |
if ( _cec.get( 'analytics' ) == 'no' ) { |
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
jQuery( document ).ready( function() { | |
/* | |
<div data-slick="{...slick json settings}" data-slick-enabled="1" data-slick-flex="inline-flex">...</div> | |
Recommended css in order to obtain better performance / loading, and the use of inline-flex instead of inline slides: | |
<style> | |
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
<?php | |
/* | |
regexp format for woocommerce checkout form editor, in case we wish to add validator there: | |
/^(\+?[0-9]{1,3})?([0-9]{3})?([0-9]{3})([0-9]{4})(\/[0-9]{4})?$/ | |
*/ | |
// lets define our regexp php validtor if we need it somewhere else | |
define( 'PHONE_VALIDATION_REGEXP', '/^(\+?[0-9]{1,3})?([0-9]{3})?([0-9]{3})([0-9]{4})(\/[0-9]{4})?$/' ); | |
// selectors of fields that could appear anywhere in the the website |
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
/** | |
* Plugin Name: WooCommerce Email Template Customizer Premium | |
* Plugin URI: https://villatheme.com/extensions/woocommerce-email-template-customizer/ | |
* Description: Make your WooCommerce emails become professional. | |
* Version: 1.2.0 | |
*/ | |
fix for rtl issue | |
woocommerce-email-template-customizer/includes/email-render.php |
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
<?php | |
add_action( 'customize_controls_print_styles', function() { | |
// TODO: consider max-width for the sidebar size | |
echo '<style> | |
body { | |
--site-width-size: 1280px; | |
--site-width-customizer-extra: 80px; | |
} | |
.wp-full-overlay.expanded { | |
margin-left: calc( 100vw - var( --site-width-size ) - var( --site-width-customizer-extra ) ); |
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
<?php | |
// acf-extended/includes/modules/autosync.php: line 450, in function save_file | |
if ( $l10n_textdomain = apply_filters( 'acfe/settings/php/l10n_textdomain', $l10n_textdomain ) ) { | |
$keys = apply_filters( 'acfe/settings/php/i10n_keys', [ | |
'title', | |
'label', | |
'instructions', | |
'message', |
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
[ | |
{ | |
"key": "group_63ee7c57739d9", | |
"title": "Stripe Accounts", | |
"fields": [ | |
{ | |
"key": "field_63ee7c579826f", | |
"label": "Stripe Accounts", | |
"name": "stripe_accounts", | |
"aria-label": "", |
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
<?php | |
/* Product Vendors */ | |
add_action( 'init', function() { | |
add_post_type_support( 'product', [ 'author' ] ); | |
add_post_type_support( 'shop_order', [ 'author' ] ); | |
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
<?php | |
$realm = 'My Realm Name'; | |
//user => password | |
$users = [ 'user1' => 'pass1', 'user2' => 'pass2' ]; | |
$authenticated = !empty( $_SERVER[ 'PHP_AUTH_DIGEST' ] ); | |
if ( $authenticated && !( $data = http_digest_parse( $_SERVER[ 'PHP_AUTH_DIGEST' ] ) ) || !isset( $users[ $data[ 'username' ] ] ) ) { |
NewerOlder