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_filter( 'pmpro_include_billing_address_fields', function ( $include ) { | |
// if someone forced to include the fields | |
// but it's set to NOT include them in settings | |
// and Stripe Checkout is active | |
// and Stripe Checkout is set to include billing address fields on its checkout page | |
// => don't include them, bc it's a conflict with some other add-on or snippet | |
if ( $include && ! pmpro_getOption( "stripe_billingaddress" ) && 'checkout' === pmpro_getOption( 'stripe_payment_flow' ) && pmpro_getOption( 'stripe_checkout_billing_address' ) ) { | |
$include = 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 | |
add_action( 'wpo_wcpdf_billing_address', function ( $billing_address, $invoice ) { | |
if ( ! empty( $invoice ) ) { | |
$billing_address_prefix = ''; | |
// billing_company | |
$company_name = trim( $invoice->order->get_meta( '_billing_company', true, 'view' ) ); | |
if ( ! empty( $company_name ) ) { | |
$billing_address_prefix .= "<b>$company_name</b><br>"; | |
} |
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( 'wpo_wcpdf_billing_address', function ( $billing_address, $invoice ) { | |
if ( ! empty( $invoice ) ) { | |
$customer_type = $invoice->order->get_meta( '_additional_wooccm0', true, 'view' ); | |
if ( 'Azienda' === $customer_type ) { | |
$company_name = $invoice->order->get_meta( '_additional_wooccm1', true, 'view' ); | |
$company_vat = $invoice->order->get_meta( '_additional_wooccm2', true, 'view' ); | |
$billing_address_prefix = ""; |
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 | |
define( 'INVOICE_GENERATION_MINIMUM_SUBTOTAL', 100 ); // se subtotale >= X€ IVA ESCUSA, allora genero la fattura | |
add_filter( 'wpo_wcpdf_document_is_allowed', function ( $allowed, $document ) { | |
if ( ! $document->exists() && ! empty( $order = $document->order ) ) { | |
if ( ! is_callable( array( $order, 'get_subtotal' ) ) ) { | |
return false; | |
} | |
// check order total & setting | |
$order_subtotal = $order->get_subtotal(); |
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
# Sell to specific EU countries only | |
UPDATE `wp_options` SET `option_value`='specific' WHERE option_name = 'woocommerce_allowed_countries'; | |
UPDATE `wp_options` SET `option_value`='a:30:{i:0;s:2:"AT";i:1;s:2:"BE";i:2;s:2:"BG";i:3;s:2:"HR";i:4;s:2:"CY";i:5;s:2:"CZ";i:6;s:2:"DK";i:7;s:2:"EE";i:8;s:2:"FI";i:9;s:2:"FR";i:10;s:2:"DE";i:11;s:2:"GR";i:12;s:2:"HU";i:13;s:2:"IE";i:14;s:2:"IM";i:15;s:2:"IT";i:16;s:2:"JE";i:17;s:2:"LV";i:18;s:2:"LT";i:19;s:2:"LU";i:20;s:2:"MT";i:21;s:2:"NL";i:22;s:2:"PL";i:23;s:2:"PT";i:24;s:2:"RO";i:25;s:2:"SK";i:26;s:2:"SI";i:27;s:2:"ES";i:28;s:2:"SE";i:29;s:2:"GB";}' WHERE option_name = 'woocommerce_specific_allowed_countries'; | |
# Ship to specific EU countries only | |
UPDATE `wp_options` SET `option_value`='specific' WHERE option_name = 'woocommerce_ship_to_countries'; | |
UPDATE `wp_options` SET `option_value`='a:30:{i:0;s:2:"AT";i:1;s:2:"BE";i:2;s:2:"BG";i:3;s:2:"HR";i:4;s:2:"CY";i:5;s:2:"CZ";i:6;s:2:"DK";i:7;s:2:"EE";i:8;s:2:"FI";i:9;s:2:"FR";i:10;s:2:"DE";i:11;s:2:"GR";i:12;s:2:"HU";i:13 |
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 | |
/** | |
* Plugin Name: SED Web - Scheduled Post Trigger | |
* Description: Publishes scheduled posts that were missed by cron at defined interval | |
* Plugin URI: | |
* Version: 1.4.0 | |
* Requires at least: 4.9 | |
* Requires PHP: 5.6 | |
* License: GPLv2 or later | |
* Author: SED Web |
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
{ | |
"name": "vendor_name/site-composer-based", | |
"description": "description", | |
"minimum-stability": "stable", | |
"license": "proprietary", | |
"authors": [ | |
{ | |
"name": "mircobabini", | |
"email": "[email protected]" | |
} |
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 | |
/** | |
* Grant access to the back-end to certain user roles | |
* | |
* @param bool $prevent_admin_access | |
* | |
* @return bool | |
*/ | |
function pmpro_grant_admin_access_to_dataanalyst( $prevent_admin_access ) { | |
if ( current_user_can( 'dataanalyst' ) ) { |
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 | |
/** | |
* Plugin Name: Duplicate Variations for WooCommerce (Disable Image Duplicator) | |
* Description: Disattiva la funzionalità di "image duplicator" che rallenta il loading delle variazioni | |
* Author: Mirco Babini | |
* Domain Path: /languages | |
* Version: 2.0.3 | |
* Author URI: https://sedweb.com/ | |
*/ | |
add_action( 'variation_duplicator_for_woocommerce_variation_image_clone_loaded', function ( $instance ) { |