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 | |
/** | |
* I hired a translator to translate my plugin into Spanish (Mexico). I want to | |
* create variants for the 13 other Spanish locales on translate.wordpress.org. | |
*/ | |
$es_mx_file_paths = array( | |
'wp-plugins-inventory-presser-stable-es-mx.po', | |
'wp-plugins-inventory-presser-stable-readme-es-mx.po', | |
); |
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
add_action( 'template_redirect', 'remove_woocommerce_styles_scripts', 999 ); | |
function remove_woocommerce_styles_scripts() { | |
if ( function_exists( 'is_woocommerce' ) ) { | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { | |
remove_action('wp_enqueue_scripts', [WC_Frontend_Scripts::class, 'load_scripts']); | |
remove_action('wp_print_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5); | |
remove_action('wp_print_footer_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5); | |
} | |
} |
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 | |
/* | |
* Access to downloadable files associated with a subscription will, by default, expire | |
* when the subscription is no longer "active" or "pending-cancel". | |
* https://woocommerce.com/document/subscriptions/faq/#section-39 | |
* This snippet overrides that behavior to allow access as per the Download Expiry settng | |
* when the subscription status is "cancelled" | |
*/ |
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 | |
defined( 'ABSPATH' ) or exit; | |
/** | |
* Plugin Name: Password Protection Admin Bypass | |
* Description: Allows logged-in administrators to bypass password protection on pages and posts. | |
* Version: 1.0.0 | |
* Author: Corey Salzano | |
* Author URI: https://github.com/csalzano | |
* Plugin URI: https://gist.github.com/csalzano/f10727dfff7614decbe663912d9c86d9 |
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
/** | |
* Add Stripe metadata along with WooCommerce purchase | |
* | |
* @param $metadata | |
* @param $order | |
* @param $source | |
* @return mixed | |
*/ | |
function wbdc_filter_wc_stripe_payment_metadata( $metadata, $order, $source ) { |
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
<? | |
# MIT license, do whatever you want with it | |
# | |
# This is my invoice.php page which I use to make invoices that customers want, | |
# with their address on it and which are easily printable. I love Stripe but | |
# their invoices and receipts were too wild for my customers on Remote OK | |
# | |
require_once(__DIR__.'/../vendor/autoload.php'); |
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 copy this line | |
/** | |
* Disables opening the Terms and Conditions page in an inline form on the Checkout page. | |
* The Terms and Conditions link will then open in a new tab/window. | |
*/ | |
add_action( 'wp', function() { | |
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 ); | |
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 ); | |
} ); |
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
/** | |
* Block Editor Settings. | |
* Add custom colors and gradients to the editor. | |
*/ | |
function tabor_add_colors_and_gradients() { | |
$colors = array( | |
'primary' => '#db1c7d', | |
'secondary' => '#a528f0', | |
'tertiary' => '#90cbff', |
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: WooCommerce Subscriptions - Contract Subscriptions | |
* Description: Disables certain action buttons for weekly subscriptions and subscriptions with a free trial. Weekly subscriptions can not be cancelled for at least a year. | |
* Author: Sébastien Dumont | |
* Author URI: https://sebastiendumont.com | |
* Version: 0.0.2 | |
* | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
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
# Install and activate typical plugins. | |
plugins: | |
wp plugin delete hello akismet; \ | |
wp plugin install debug-bar disable-emojis jetpack query-monitor woocommerce --activate; \ | |
# Install, copy and clean up drop-ins. | |
cache-plugins: | |
wp plugin install batcache memcached-redux; \ | |
cp wp-content/plugins/batcache/advanced-cache.php wp-content/advanced-cache.php; \ | |
cp wp-content/plugins/memcached-redux/object-cache.php wp-content/object-cache.php; \ |
NewerOlder