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
/* | |
* Remove the default WooCommerce 3 JSON/LD structured data format | |
*/ | |
function remove_output_structured_data() { | |
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // Frontend pages | |
remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // Emails | |
} | |
add_action( 'init', 'remove_output_structured_data' ); |
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 | |
/* | |
* Create order dynamically | |
*/ | |
add_action( 'woocommerce_before_checkout_form', 'create_order' ); | |
function create_order() { | |
global $woocommerce; | |
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 | |
/** | |
* When you hover a product image when on the single product page, you can zoom on the products images; I love this feature, however | |
* Some people would like to remove it. | |
* To do so, simply paste this snippet in your functions.php file | |
*/ | |
add_action( 'after_setup_theme', 'theme_name_setup' ); | |
function theme_name_setup() { | |
remove_theme_support( 'wc-product-gallery-zoom' ); |
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 | |
// Place this in your functions.php file in your theme folder. | |
remove_theme_support( 'wc-product-gallery-lightbox' ); |
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 | |
// Display variations dropdowns on shop page for variable products | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
function woo_display_variation_dropdown_on_shop_page() { | |
global $product; | |
if( $product->is_type( 'variable' )) { | |
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 | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Add custom fee to cart automatically | |
* | |
*/ | |
function woo_add_cart_fee() { | |
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 | |
if ( ! class_exists('Validate') ) { | |
class Validate { | |
/** | |
* Check if the value is present. | |
* | |
* @param mixed $value | |
* @return boolean |
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 | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
class Shapla_Hero_Slider extends Widget_Base { | |
/** | |
* Retrieve the name. | |
* |
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
server { | |
# Point your wordpress project directory. in our case it is (/var/www/wordpress.test) | |
root /var/www/wordpress.test; | |
index index.php; | |
# Give virtual host domain name | |
server_name wordpress.test www.wordpress.test; | |
location = /favicon.ico { |
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
; the maximum time in seconds a script is allowed to run before it is terminated by the parser | |
max_execution_time = 300 | |
; the maximum amount of memory in bytes that a script is allowed to allocate. | |
; Suggested: 256 MB or greater | |
memory_limit = 128M | |
; How many input variables may be accepted | |
max_input_vars = 4000 |
OlderNewer