I hereby claim:
- I am tharsheblows on github.
- I am mjjay (https://keybase.io/mjjay) on keybase.
- I have a public key ASBzB6w1DaikAYyikGjuZyT62E-0D3KqNUoUbBoGk6PsYgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
diff --git a/includes/wcs-resubscribe-functions.php b/includes/wcs-resubscribe-functions.php | |
index 2faea23..b8e94c8 100644 | |
--- a/includes/wcs-resubscribe-functions.php | |
+++ b/includes/wcs-resubscribe-functions.php | |
@@ -219,11 +219,23 @@ function wcs_can_user_resubscribe_to( $subscription, $user_id = '' ) { | |
} | |
} | |
- if ( empty( $resubscribe_order_ids ) && $subscription->get_payment_count() > 0 && true === $all_line_items_exist && false === $has_active_limited_subscription ) { | |
+ // When an order is cancelled, the subscription is cancelled. |
diff --git a/includes/class-wcs-limiter.php b/includes/class-wcs-limiter.php | |
index d030723..4fa1e8d 100644 | |
--- a/includes/class-wcs-limiter.php | |
+++ b/includes/class-wcs-limiter.php | |
@@ -253,7 +253,7 @@ class WCS_Limiter { | |
foreach ( $order->get_items() as $item ) { | |
// If this order contains the product we're interested in, continue finding a related subscription. | |
- if ( $item['product_id'] == $product_id && $item['variation_id'] == $product_id ) { | |
+ if ( $item['product_id'] == $product_id || $item['variation_id'] == $product_id ) { |
/** @jsx jsx */ | |
import { jsx } from 'theme-ui' | |
const CommentsCount = ( { post } ) => { | |
const commentCount = post.commentCount || 0 | |
return ( | |
<div sx={{ mb: 2 }}> | |
Comments: { commentCount } | |
</div> | |
) |
/** @jsx jsx */ | |
import { jsx, Styled } from 'theme-ui' | |
import React from 'react' | |
import Comment from './Comment' | |
const CommentsList = ({ comments }) => { | |
const commentCount = ( comments ) ? `${comments.length} ` : '' | |
const commentHeading = | |
commentCount > 1 ? 'Comments' : commentCount < 1 ? 'No comments' : 'Comment' |
/** @jsx jsx */ | |
import { jsx } from 'theme-ui' | |
import React from 'react' | |
import sanitizeHtml from 'sanitize-html' | |
import Date from './Date' | |
const Comment = ({ comment }) => { | |
const { |
/** @jsx jsx */ | |
import { jsx, Styled } from 'theme-ui' | |
import { useState } from 'react' | |
const CommentForm = ({ post, commentsEndpoint }) => { | |
const postId = post.postId | |
const [userName, setUserName] = useState('') | |
const [email, setEmail] = useState('') | |
const [message, setMessage] = useState('') |
/** @jsx jsx */ | |
import { jsx } from 'theme-ui' | |
import React, { useState, useEffect } from 'react' | |
import CommentsCount from './CommentsCount' | |
import CommentsList from './CommentsList' | |
import CommentForm from './CommentForm' | |
const Comments = ({ post, location, wordPressUrl }) => { | |
// The comments endpoint, hardcoded in, I have no shame. | |
const commentsEndpoint = `${wordPressUrl}/wp-json/wp/v2/comments` |
<?php | |
namespace Lalala\Src; | |
use \Defuse\Crypto\Crypto; | |
use \Defuse\Crypto\Key; | |
use Lalala\Src\Debug\Logging; | |
/** | |
* Wrapper class for encryption. |