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
User-agent: * # Создаем секцию правил для роботов. * значит для всех | |
# роботов. Чтобы указать секцию правил для отдельного | |
# робота, вместо * укажите его имя: GoogleBot, Yandex. | |
Disallow: /cgi-bin # Стандартная папка на хостинге. | |
Disallow: /wp-admin/ # Закрываем админку. | |
Allow: /wp-admin/admin-ajax.php # Откроем аякс. | |
Disallow: /? # Все параметры запроса на главной. | |
Disallow: *?s= # Поиск. | |
Disallow: *&s= # Поиск. | |
Disallow: /search # Поиск. |
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
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { ?> | |
<tr> | |
<td> |
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 | |
/** | |
* @snippet WooCommerce How To Add New Tab @ My Account | |
* @how-to Watch tutorial @ https://techiesandesh.com | |
* @author Sandesh Jangam | |
* @compatible WooCommerce 3.6.2 | |
* @donate $7 https://www.paypal.me/SandeshJangam/7 | |
*/ | |
/** |
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
// create a custom end point in the My Accunt Page | |
function custom_wc_end_point() { | |
if(class_exists('WooCommerce')){ | |
add_rewrite_endpoint( 'wholesale-ordering', EP_ROOT | EP_PAGES ); | |
} | |
} | |
add_action( 'init', 'custom_wc_end_point' ); | |
function custom_endpoint_query_vars( $vars ) { | |
$vars[] = 'wholesale-ordering'; | |
return $vars; |
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 | |
/* | |
Plugin Name: WooCustom My Account | |
Plugin URI: http://wpbeaches.com/ | |
Description: WooCustom - add a custom area in my-account | |
Author: Neil Gee | |
Version: 1.0.0 | |
Author URI: http://wpbeaches.com | |
License: GPL-2.0+ |
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 | |
/** | |
*Plugin Name: Myaccount Additional Tab | |
*Plugin URI: coming soon | |
*Description: Just another myaccount plugin. Simple but flexible. | |
*Author: Narendra Singh | |
*Author URI: https://roimantra.com/ | |
*Text Domain: MyAccount Tab | |
*Domain Path: /languages/ |
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 | |
// Thank you page text | |
add_filter('woocommerce_thankyou_order_received_text', 'woo_change_order_received_text', 10, 2 ); | |
function woo_change_order_received_text( $str, $order ) { | |
// Text to change | |
$new_str = 'Thank you for buying, Order received successfully.<br />'; | |
$new_str .= 'To Access your dashboard click here <a class="elementor-button-link elementor-button elementor-size-sm" role="button" href="/dashboard"> | |
<span class="elementor-button-content-wrapper"> | |
<span class="elementor-button-text">My Dashboard</span></span></a>'; |
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
Rename WP Job Manager StringsRename WP Job Manager Strings |
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 | |
/* | |
Plugin Name: Add Editor to WPJM Management | |
Plugin URI: http://wpjobmanager.com | |
Description: Custom plugin to add the editor to WPJM. | |
Version: 0.1 | |
Author: Brandon Kraft | |
Author URI: https://kraft.im/ | |
*/ |
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
// With the help of Jeremy Keith, I was able to create a fully scalable code sample that you can copy-paste into your project. | |
// It will save the user input value on blur, this includes radio buttons, checkboxes and date inputs besides regular text/number inputs. | |
// The only condition is that you give the form element on your page a data-attribute of data-form-topic="foo". | |
// This code snippet saves the data-attribute as the key to the localStorage, and the value of it will be an object with key/value pairs of the respective inputs name and value. | |
// Please refer to this gist somewhere in your code if you use it :) | |
// Happy coding! | |
// VARIABLE DECLARATIONS | |
// objects | |
let savedData = {}; |