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
#This script still contains all of the print() outputs that I used while refining and debugging it. | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from urllib.parse import urljoin |
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 | |
function jsforwp_add_user_to_group( $order_id ) { | |
//$group_rules contains settings in the format of product_id => array(groupid, groupid, groupid) | |
$group_rules = array( | |
26325 => array(26346, 26348, 26349), | |
26329 => array(26346, 26348, 26349), | |
26327 => array(26351, 26353, 26354), | |
23661 => array(26351, 26353, 26354), | |
26138 => array(26359), |
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 yoinked this off of Stack Overflow. it was buried in the comments, but it works flawlessly. | |
I'm making some small modifications, which I'll update here as I go. | |
*/ | |
//enable multiple add to cart | |
//use syntax ?add-to-cart=1111,2222,3333 | |
function woocommerce_maybe_add_multiple_products_to_cart() { |
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 | |
//just make sure you include $authtoken before you call this file anywhere or you'll be really annoyed! | |
if(!isset($authtoken)){ | |
for($i=0;$i<1000;$i++){ | |
echo "<script>alert('why for are you haxing mi???');</script>"; | |
} | |
die("You are not authorized to view this page!!!"); | |
} |
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 this to your functions.php or include it there from another file. | |
function mytheme_includes() { | |
if (! class_exists('Mfn_Post_Type_Video')) { //change references to 'Video or video' to your post type | |
class Mfn_Post_Type_Video extends Mfn_Post_Type | |
{ | |
/** | |
* Mfn_Post_Type_Video constructor |
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
/* | |
* place this just inside your theme's <header> tag, | |
* or above the header and menus if you're theme isn't following proper html5 recommendations | |
* | |
* I used CPTUI to create a custom post type of 'COVID-19 Header', | |
* and then enabled the post type in WPBakery Page Builder > Role Manager | |
* | |
* Grab the 'post_id' of the post you create, and use it in the code below | |
* | |
* You'll need to give your block elements class names, and write your own CSS. 'Design Tab' settings won't work. |
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 the following to your theme's functions.php file | |
In this case, I wanted to add a background image outside of the normal controls | |
so I could darken it by a % using linear gradients. | |
I added 2 fields to vc_column_inner: | |
*/ | |
// The background image | |
vc_add_param("vc_column_inner", array( |
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 this to /wp-content/[your-theme]/woocommerce/checkout ## | |
/** | |
* Checkout Form | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you |
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 this to your theme's functions.php file */ | |
/* Add option for URL to column settings */ | |
vc_add_param("vc_column", array( | |
"type" => "vc_link", | |
"class" => "", | |
"heading" => "Column Link", |