Skip to content

Commit

Permalink
Fix status / WooCommerce conflicts caused by v1.8
Browse files Browse the repository at this point in the history
Disabled the workarounds for WP edit_published_posts handling.  The workarounds pertain to users with role capabilities modified to include the edit_published_posts capability but not the publish_posts capability.  It has two portions:

(1) allow published posts to be properly edited,
(2) prevent published posts from being unpublished

Workaround part (2) is the one which caused the issues through erroneous status storage.  However, both parts of the workaround are disabled until further code verification and testing.
  • Loading branch information
agapetry committed Oct 26, 2019
1 parent 13a9e3e commit fcaa541
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions capsman-enhanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Capability Manager Enhanced
* Plugin URI: https://publishpress.com
* Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
* Version: 1.8
* Version: 1.8.1
* Author: PublishPress
* Author URI: https://publishpress.com
* Text Domain: capsman-enhanced
Expand All @@ -27,8 +27,8 @@
*/

if ( ! defined( 'CAPSMAN_VERSION' ) ) {
define( 'CAPSMAN_VERSION', '1.8' );
define( 'CAPSMAN_ENH_VERSION', '1.8' );
define( 'CAPSMAN_VERSION', '1.8.1' );
define( 'CAPSMAN_ENH_VERSION', '1.8.1' );
}

if ( cme_is_plugin_active( 'capsman.php' ) ) {
Expand Down
5 changes: 0 additions & 5 deletions includes/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ function add( $object ) {
$cme_extensions->add( new CME_WooCommerce() );
}

if (!defined('CME_DISABLE_WP_EDIT_PUBLISHED_WORKAROUND')) {
require_once (dirname(__FILE__) . '/filters-wp_rest_workarounds.php');
new PublishPress\Capabilities\WP_REST_Workarounds();
}

if ( is_admin() ) {
global $pagenow;
if ( 'edit.php' == $pagenow ) {
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Keep in mind that this plugin's main purpose is to expose switches (defined capa

== Changelog ==

= 1.8.1 - 25 Oct 2019 =
* Fixed : Autodraft publication, incorrect WooCommerce status storage (since 1.8)

= 1.8 - 24 Oct 2019 =
* Feature : WooCommerce, PublishPress, PressPermit capabilities grouped in sections on role editor screen
* Feature : Plugin API - plugins can hook into "cme_plugin_capabilities" filter to register their capabilities
Expand Down

0 comments on commit fcaa541

Please sign in to comment.