/var/www/example.com/public_html/ # → Public folder
└── .htaccess
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('wcs_view_subscription_actions', 'add_skip_action', 99, 3); | |
add_filter('wcs_view_subscription_actions', 'rename_default_actions', 10, 3); | |
/** | |
* Adds the customer skip action, if allowed. Ex. If next renewal is in Oct 10, when the user click this button, the next payment date will be in Nov 10. | |
* Long story short, delays next payment date 1 month for the subscription. | |
* | |
* @since 4.0.0 |
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('woocommerce_package_rates', 'maybe_force_free_shipping', 99); | |
/** | |
* @param array $rates Array of rates found for the package. | |
* @return array | |
*/ | |
function maybe_force_free_shipping($rates) | |
{ |
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
//Woocommerce Checkout JS events | |
$( document.body ).trigger( 'init_checkout' ); | |
$( document.body ).trigger( 'payment_method_selected' ); | |
$( document.body ).trigger( 'update_checkout' ); | |
$( document.body ).trigger( 'updated_checkout' ); | |
$( document.body ).trigger( 'checkout_error' ); | |
//Woocommerce cart page JS events | |
$( document.body ).trigger( 'wc_cart_emptied' ); | |
$( document.body ).trigger( 'update_checkout' ); |
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: All Products for WooCommerce Subscriptions - Use regular price instead of sale price for calculating subscriptions discounts | |
* Plugin URI: https://woocommerce.com/products/all-products-for-woocommerce-subscriptions/ | |
* Description: Use this snippet to hide cart item subscription options for free products. | |
* Version: 1.0 | |
* Author: Renan Diaz | |
* Author URI: https://nativo.team/ | |
* Developer: Renan Diaz |
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: All Products for WooCommerce Subscriptions - Hide Cart Item Subscription Options for Free Products | |
* Plugin URI: https://woocommerce.com/products/all-products-for-woocommerce-subscriptions/ | |
* Description: Use this snippet to hide cart item subscription options for free products. | |
* Version: 1.0 | |
* Author: Renan Diaz | |
* Author URI: https://nativo.team/ | |
* Developer: Renan Diaz | |
*/ |
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 | |
/** | |
* Wrap any content in the WooCommerce default email template of your store, for any use. Get the heading, message and footer to send. | |
* @author Renan Diaz <[email protected]> | |
*/ | |
function wrap_email_content( $heading = null, $message = null ) { | |
if ( $message !== null && !empty($message) ) { | |
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
msgid "" | |
msgstr "" | |
"Plural-Forms: nplurals=2; plural=n != 1;\n" | |
"Project-Id-Version: Booked Appointments\n" | |
"POT-Creation-Date: 2018-01-05 15:39-0500\n" | |
"PO-Revision-Date: 2018-05-05 14:54+0000\n" | |
"Last-Translator: Nativo Team <[email protected]>\n" | |
"Language-Team: Spanish (Spain)\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" |
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 | |
//Renan Diaz - 2018 | |
//Woocommerce restrinct certain categories combinations in the Woocommerce cart | |
//Restrinctions Begin | |
add_action('woocommerce_before_single_product', 'fs_check_category_in_cart'); | |
function fs_check_category_in_cart() { | |
// Set $cat_in_cart | |
$cat_in_cart = ''; |